aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/core/dev.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 3c40d545a035..76a1502efe67 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4315,12 +4315,12 @@ int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa)
4315EXPORT_SYMBOL(dev_set_mac_address); 4315EXPORT_SYMBOL(dev_set_mac_address);
4316 4316
4317/* 4317/*
4318 * Perform the SIOCxIFxxx calls, inside read_lock(dev_base_lock) 4318 * Perform the SIOCxIFxxx calls, inside rcu_read_lock()
4319 */ 4319 */
4320static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr, unsigned int cmd) 4320static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr, unsigned int cmd)
4321{ 4321{
4322 int err; 4322 int err;
4323 struct net_device *dev = __dev_get_by_name(net, ifr->ifr_name); 4323 struct net_device *dev = dev_get_by_name_rcu(net, ifr->ifr_name);
4324 4324
4325 if (!dev) 4325 if (!dev)
4326 return -ENODEV; 4326 return -ENODEV;
@@ -4552,9 +4552,9 @@ int dev_ioctl(struct net *net, unsigned int cmd, void __user *arg)
4552 case SIOCGIFINDEX: 4552 case SIOCGIFINDEX:
4553 case SIOCGIFTXQLEN: 4553 case SIOCGIFTXQLEN:
4554 dev_load(net, ifr.ifr_name); 4554 dev_load(net, ifr.ifr_name);
4555 read_lock(&dev_base_lock); 4555 rcu_read_lock();
4556 ret = dev_ifsioc_locked(net, &ifr, cmd); 4556 ret = dev_ifsioc_locked(net, &ifr, cmd);
4557 read_unlock(&dev_base_lock); 4557 rcu_read_unlock();
4558 if (!ret) { 4558 if (!ret) {
4559 if (colon) 4559 if (colon)
4560 *colon = ':'; 4560 *colon = ':';