Commit 3201188e authored by Stephen Hemminger's avatar Stephen Hemminger

[NET]: Add missing rcu_read_lock to bpqether.

parent c3379065
...@@ -141,7 +141,6 @@ static inline struct net_device *bpq_get_ether_dev(struct net_device *dev) ...@@ -141,7 +141,6 @@ static inline struct net_device *bpq_get_ether_dev(struct net_device *dev)
/* /*
* Get the BPQ device for the ethernet device * Get the BPQ device for the ethernet device
* need to hold bqp_lock at least for read
*/ */
static inline struct net_device *bpq_get_ax25_dev(struct net_device *dev) static inline struct net_device *bpq_get_ax25_dev(struct net_device *dev)
{ {
...@@ -564,6 +563,8 @@ static int bpq_device_event(struct notifier_block *this,unsigned long event, voi ...@@ -564,6 +563,8 @@ static int bpq_device_event(struct notifier_block *this,unsigned long event, voi
if (!dev_is_ethdev(dev)) if (!dev_is_ethdev(dev))
return NOTIFY_DONE; return NOTIFY_DONE;
rcu_read_lock();
switch (event) { switch (event) {
case NETDEV_UP: /* new ethernet device -> new BPQ interface */ case NETDEV_UP: /* new ethernet device -> new BPQ interface */
if (bpq_get_ax25_dev(dev) == NULL) if (bpq_get_ax25_dev(dev) == NULL)
...@@ -582,6 +583,7 @@ static int bpq_device_event(struct notifier_block *this,unsigned long event, voi ...@@ -582,6 +583,7 @@ static int bpq_device_event(struct notifier_block *this,unsigned long event, voi
default: default:
break; break;
} }
rcu_read_unlock();
return NOTIFY_DONE; return NOTIFY_DONE;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment