brcompat: Remove unneeded RCU locking.
authorBen Pfaff <blp@nicira.com>
Thu, 1 Jan 2009 18:09:32 +0000 (10:09 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 1 Jan 2009 18:10:07 +0000 (10:10 -0800)
The only memory accessed here is in 'dev', which can't
disappear because we maintain a reference count on it.
net_devices aren't RCU-locked anyway.

datapath/brcompat.c

index 78c83edd57b43bedb475de892d2f4a731dff440c..b0bbef6b1af48f29915c1073149588273debed4d 100644 (file)
@@ -184,12 +184,10 @@ old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 
                memset(&b, 0, sizeof(struct __bridge_info));
 
-               rcu_read_lock();
                for (i=0; i<ETH_ALEN; i++) 
                        id |= (uint64_t)dev->dev_addr[i] << (8*(ETH_ALEN-1 - i));
                b.bridge_id = cpu_to_be64(id);
                b.stp_enabled = 0;
-               rcu_read_unlock();
 
                if (copy_to_user((void __user *)args[1], &b, sizeof(b)))
                        return -EFAULT;