projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cc7659
)
ipv6: route: make rtm_getroute not assume rtnl is locked
author
Florian Westphal
<
[email protected]
>
Tue, 15 Aug 2017 14:34:42 +0000
(16:34 +0200)
committer
David S. Miller
<
[email protected]
>
Wed, 16 Aug 2017 00:20:54 +0000
(17:20 -0700)
__dev_get_by_index assumes RTNL is held, use _rcu version instead.
Signed-off-by: Florian Westphal <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/ipv6/route.c
patch
|
blob
|
history
diff --git
a/net/ipv6/route.c
b/net/ipv6/route.c
index 6793135d49dbf3f28aa59f93a0ca09aa98648e9a..60705b4d2c6248239f11737c72b3c15e2b525700 100644
(file)
--- a/
net/ipv6/route.c
+++ b/
net/ipv6/route.c
@@
-3611,8
+3611,11
@@
static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh,
struct net_device *dev;
int flags = 0;
- dev = __dev_get_by_index(net, iif);
+ rcu_read_lock();
+
+ dev = dev_get_by_index_rcu(net, iif);
if (!dev) {
+ rcu_read_unlock();
err = -ENODEV;
goto errout;
}
@@
-3624,6
+3627,8
@@
static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh,
if (!fibmatch)
dst = ip6_route_input_lookup(net, dev, &fl6, flags);
+
+ rcu_read_unlock();
} else {
fl6.flowi6_oif = oif;