File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -4204,14 +4204,17 @@ static void addrconf_dad_work(struct work_struct *w)
4204
4204
struct inet6_dev * idev = ifp -> idev ;
4205
4205
bool bump_id , disable_ipv6 = false;
4206
4206
struct in6_addr mcaddr ;
4207
+ struct net * net ;
4207
4208
4208
4209
enum {
4209
4210
DAD_PROCESS ,
4210
4211
DAD_BEGIN ,
4211
4212
DAD_ABORT ,
4212
4213
} action = DAD_PROCESS ;
4213
4214
4214
- rtnl_lock ();
4215
+ net = dev_net (idev -> dev );
4216
+
4217
+ rtnl_net_lock (net );
4215
4218
4216
4219
spin_lock_bh (& ifp -> lock );
4217
4220
if (ifp -> state == INET6_IFADDR_STATE_PREDAD ) {
@@ -4221,7 +4224,7 @@ static void addrconf_dad_work(struct work_struct *w)
4221
4224
action = DAD_ABORT ;
4222
4225
ifp -> state = INET6_IFADDR_STATE_POSTDAD ;
4223
4226
4224
- if ((READ_ONCE (dev_net ( idev -> dev ) -> ipv6 .devconf_all -> accept_dad ) > 1 ||
4227
+ if ((READ_ONCE (net -> ipv6 .devconf_all -> accept_dad ) > 1 ||
4225
4228
READ_ONCE (idev -> cnf .accept_dad ) > 1 ) &&
4226
4229
!idev -> cnf .disable_ipv6 &&
4227
4230
!(ifp -> flags & IFA_F_STABLE_PRIVACY )) {
@@ -4303,7 +4306,7 @@ static void addrconf_dad_work(struct work_struct *w)
4303
4306
ifp -> dad_nonce );
4304
4307
out :
4305
4308
in6_ifa_put (ifp );
4306
- rtnl_unlock ( );
4309
+ rtnl_net_unlock ( net );
4307
4310
}
4308
4311
4309
4312
/* ifp->idev must be at least read locked */
You can’t perform that action at this time.
0 commit comments