projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d94d9fe
)
decnet: avoid touching device refcount in dn_dev_by_index()
author
Eric Dumazet
<eric.dumazet@gmail.com>
Wed, 4 Nov 2009 18:59:38 +0000
(10:59 -0800)
committer
David S. Miller
<davem@davemloft.net>
Wed, 4 Nov 2009 18:59:38 +0000
(10:59 -0800)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/decnet/dn_dev.c
patch
|
blob
|
blame
|
history
diff --git
a/net/decnet/dn_dev.c
b/net/decnet/dn_dev.c
index 6e1f085db06af33a1f069d22816d9b463f413939..d82694d930b425b3237af25688cdf63071effc6c 100644
(file)
--- a/
net/decnet/dn_dev.c
+++ b/
net/decnet/dn_dev.c
@@
-600,15
+600,17
@@
static void dn_dev_check_default(struct net_device *dev)
dev_put(dev);
}
+/*
+ * Called with RTNL
+ */
static struct dn_dev *dn_dev_by_index(int ifindex)
{
struct net_device *dev;
struct dn_dev *dn_dev = NULL;
- dev = dev_get_by_index(&init_net, ifindex);
- if (dev) {
+
+ dev = __dev_get_by_index(&init_net, ifindex);
+ if (dev)
dn_dev = dev->dn_ptr;
- dev_put(dev);
- }
return dn_dev;
}