mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 06:10:56 +00:00
gtp: remove useless rcu_read_lock()
The rtnl lock is taken just the line above, no need to take the rcu also.
Fixes: 1788b8569f
("gtp: fix use-after-free in gtp_encap_destroy()")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e859a60add
commit
e2d1baca2b
1 changed files with 0 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue