summaryrefslogtreecommitdiff
path: root/drivers/net/gtp.c
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2020-08-28 15:30:55 +0200
committerDavid S. Miller <davem@davemloft.net>2020-08-31 12:24:34 -0700
commite2d1baca2b3396371db0a6e1643e487519122069 (patch)
tree6896a2b8fbf92de1a8e41cb71a1f0399fe1b9401 /drivers/net/gtp.c
parente859a60add1dd3f844c94c7a782c1a16610bd192 (diff)
gtp: remove useless rcu_read_lock()
The rtnl lock is taken just the line above, no need to take the rcu also. Fixes: 1788b8569f5d ("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>
Diffstat (limited to 'drivers/net/gtp.c')
-rw-r--r--drivers/net/gtp.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
index c84a10569388..6f871ec31393 100644
--- a/drivers/net/gtp.c
+++ b/drivers/net/gtp.c
@@ -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;
}