mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
ipv6: add net device refcount tracker to rt6_probe_deferred()
Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
9038c32000
commit
fb67510ba9
@ -593,6 +593,7 @@ struct __rt6_probe_work {
|
||||
struct work_struct work;
|
||||
struct in6_addr target;
|
||||
struct net_device *dev;
|
||||
netdevice_tracker dev_tracker;
|
||||
};
|
||||
|
||||
static void rt6_probe_deferred(struct work_struct *w)
|
||||
@ -603,7 +604,7 @@ static void rt6_probe_deferred(struct work_struct *w)
|
||||
|
||||
addrconf_addr_solict_mult(&work->target, &mcaddr);
|
||||
ndisc_send_ns(work->dev, &work->target, &mcaddr, NULL, 0);
|
||||
dev_put(work->dev);
|
||||
dev_put_track(work->dev, &work->dev_tracker);
|
||||
kfree(work);
|
||||
}
|
||||
|
||||
@ -657,7 +658,7 @@ static void rt6_probe(struct fib6_nh *fib6_nh)
|
||||
} else {
|
||||
INIT_WORK(&work->work, rt6_probe_deferred);
|
||||
work->target = *nh_gw;
|
||||
dev_hold(dev);
|
||||
dev_hold_track(dev, &work->dev_tracker, GFP_KERNEL);
|
||||
work->dev = dev;
|
||||
schedule_work(&work->work);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user