aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bridge/br_ioctl.c')
-rw-r--r--net/bridge/br_ioctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c
index 6a6433daaf27..995afc4b04dc 100644
--- a/net/bridge/br_ioctl.c
+++ b/net/bridge/br_ioctl.c
@@ -15,6 +15,7 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/if_bridge.h> 16#include <linux/if_bridge.h>
17#include <linux/netdevice.h> 17#include <linux/netdevice.h>
18#include <linux/slab.h>
18#include <linux/times.h> 19#include <linux/times.h>
19#include <net/net_namespace.h> 20#include <net/net_namespace.h>
20#include <asm/uaccess.h> 21#include <asm/uaccess.h>
@@ -81,6 +82,7 @@ static int get_fdb_entries(struct net_bridge *br, void __user *userbuf,
81 return num; 82 return num;
82} 83}
83 84
85/* called with RTNL */
84static int add_del_if(struct net_bridge *br, int ifindex, int isadd) 86static int add_del_if(struct net_bridge *br, int ifindex, int isadd)
85{ 87{
86 struct net_device *dev; 88 struct net_device *dev;
@@ -89,7 +91,7 @@ static int add_del_if(struct net_bridge *br, int ifindex, int isadd)
89 if (!capable(CAP_NET_ADMIN)) 91 if (!capable(CAP_NET_ADMIN))
90 return -EPERM; 92 return -EPERM;
91 93
92 dev = dev_get_by_index(dev_net(br->dev), ifindex); 94 dev = __dev_get_by_index(dev_net(br->dev), ifindex);
93 if (dev == NULL) 95 if (dev == NULL)
94 return -EINVAL; 96 return -EINVAL;
95 97
@@ -98,7 +100,6 @@ static int add_del_if(struct net_bridge *br, int ifindex, int isadd)
98 else 100 else
99 ret = br_del_if(br, dev); 101 ret = br_del_if(br, dev);
100 102
101 dev_put(dev);
102 return ret; 103 return ret;
103} 104}
104 105