mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
decnet: netdevice refcount leak
While working on device refcount stuff, I found a device refcount leak through DECNET. This nasty bug can be used to hold refcounts on any !DECNET netdevice. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f9dd09c7f7
commit
887e671f32
1 changed files with 3 additions and 4 deletions
|
@ -263,11 +263,10 @@ static int dn_def_dev_strategy(ctl_table *table,
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
rv = -ENODEV;
|
rv = -ENODEV;
|
||||||
if (dev->dn_ptr != NULL) {
|
if (dev->dn_ptr != NULL)
|
||||||
rv = dn_dev_set_default(dev, 1);
|
rv = dn_dev_set_default(dev, 1);
|
||||||
if (rv)
|
if (rv)
|
||||||
dev_put(dev);
|
dev_put(dev);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
|
|
Loading…
Reference in a new issue