Commit e2d1baca authored by Nicolas Dichtel's avatar Nicolas Dichtel Committed by David S. Miller

gtp: remove useless rcu_read_lock()

The rtnl lock is taken just the line above, no need to take the rcu also.

Fixes: 1788b856 ("gtp: fix use-after-free in gtp_encap_destroy()")
Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e859a60a
......@@ -1071,7 +1071,6 @@ static int gtp_genl_new_pdp(struct sk_buff *skb, struct genl_info *info)
}
rtnl_lock();
rcu_read_lock();
gtp = gtp_find_dev(sock_net(skb->sk), info->attrs);
if (!gtp) {
......@@ -1100,7 +1099,6 @@ static int gtp_genl_new_pdp(struct sk_buff *skb, struct genl_info *info)
}
out_unlock:
rcu_read_unlock();
rtnl_unlock();
return err;
}
......
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