projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9dd09c
)
decnet: netdevice refcount leak
author
Eric Dumazet
<
[email protected]
>
Fri, 6 Nov 2009 08:50:39 +0000
(
00:50
-0800)
committer
David S. Miller
<
[email protected]
>
Fri, 6 Nov 2009 08:50:39 +0000
(
00:50
-0800)
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 <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/decnet/sysctl_net_decnet.c
patch
|
blob
|
history
diff --git
a/net/decnet/sysctl_net_decnet.c
b/net/decnet/sysctl_net_decnet.c
index 26b0ab1e9f560b75d046c687fabf27dfed1b4f48..2036568beea98260d11eb8bda40dd1d8a7d0c903 100644
(file)
--- a/
net/decnet/sysctl_net_decnet.c
+++ b/
net/decnet/sysctl_net_decnet.c
@@
-263,11
+263,10
@@
static int dn_def_dev_strategy(ctl_table *table,
return -ENODEV;
rv = -ENODEV;
- if (dev->dn_ptr != NULL)
{
+ if (dev->dn_ptr != NULL)
rv = dn_dev_set_default(dev, 1);
- if (rv)
- dev_put(dev);
- }
+ if (rv)
+ dev_put(dev);
}
return rv;