diff options
Diffstat (limited to 'net/phonet/pn_dev.c')
-rw-r--r-- | net/phonet/pn_dev.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c index 1566672235dd..d2df8f33160b 100644 --- a/net/phonet/pn_dev.c +++ b/net/phonet/pn_dev.c | |||
@@ -418,18 +418,14 @@ int phonet_route_del(struct net_device *dev, u8 daddr) | |||
418 | return 0; | 418 | return 0; |
419 | } | 419 | } |
420 | 420 | ||
421 | struct net_device *phonet_route_get(struct net *net, u8 daddr) | 421 | struct net_device *phonet_route_get_rcu(struct net *net, u8 daddr) |
422 | { | 422 | { |
423 | struct phonet_net *pnn = phonet_pernet(net); | 423 | struct phonet_net *pnn = phonet_pernet(net); |
424 | struct phonet_routes *routes = &pnn->routes; | 424 | struct phonet_routes *routes = &pnn->routes; |
425 | struct net_device *dev; | 425 | struct net_device *dev; |
426 | 426 | ||
427 | ASSERT_RTNL(); /* no need to hold the device */ | ||
428 | |||
429 | daddr >>= 2; | 427 | daddr >>= 2; |
430 | rcu_read_lock(); | ||
431 | dev = rcu_dereference(routes->table[daddr]); | 428 | dev = rcu_dereference(routes->table[daddr]); |
432 | rcu_read_unlock(); | ||
433 | return dev; | 429 | return dev; |
434 | } | 430 | } |
435 | 431 | ||