diff options
-rw-r--r-- | net/bridge/br_ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c index 6a6433daaf27..2af6e4a90262 100644 --- a/net/bridge/br_ioctl.c +++ b/net/bridge/br_ioctl.c | |||
@@ -81,6 +81,7 @@ static int get_fdb_entries(struct net_bridge *br, void __user *userbuf, | |||
81 | return num; | 81 | return num; |
82 | } | 82 | } |
83 | 83 | ||
84 | /* called with RTNL */ | ||
84 | static int add_del_if(struct net_bridge *br, int ifindex, int isadd) | 85 | static int add_del_if(struct net_bridge *br, int ifindex, int isadd) |
85 | { | 86 | { |
86 | struct net_device *dev; | 87 | struct net_device *dev; |
@@ -89,7 +90,7 @@ static int add_del_if(struct net_bridge *br, int ifindex, int isadd) | |||
89 | if (!capable(CAP_NET_ADMIN)) | 90 | if (!capable(CAP_NET_ADMIN)) |
90 | return -EPERM; | 91 | return -EPERM; |
91 | 92 | ||
92 | dev = dev_get_by_index(dev_net(br->dev), ifindex); | 93 | dev = __dev_get_by_index(dev_net(br->dev), ifindex); |
93 | if (dev == NULL) | 94 | if (dev == NULL) |
94 | return -EINVAL; | 95 | return -EINVAL; |
95 | 96 | ||
@@ -98,7 +99,6 @@ static int add_del_if(struct net_bridge *br, int ifindex, int isadd) | |||
98 | else | 99 | else |
99 | ret = br_del_if(br, dev); | 100 | ret = br_del_if(br, dev); |
100 | 101 | ||
101 | dev_put(dev); | ||
102 | return ret; | 102 | return ret; |
103 | } | 103 | } |
104 | 104 | ||