Skip to content
Snippets Groups Projects
Commit 887e671f authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

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: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f9dd09c7
No related branches found
No related tags found
No related merge requests found
...@@ -263,11 +263,10 @@ static int dn_def_dev_strategy(ctl_table *table, ...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment