Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: davem@davemloft.net, kuba@kernel.org, pablo@netfilter.org,
laforge@gnumonks.org, osmocom-net-gprs@lists.osmocom.org
Cc: netdev@vger.kernel.org, Nicolas Dichtel <nicolas.dichtel@6wind.com>
Subject: [PATCH net-next 1/2] gtp: remove useless rcu_read_lock()
Date: Fri, 28 Aug 2020 15:30:55 +0200 [thread overview]
Message-ID: <20200828133056.22751-2-nicolas.dichtel@6wind.com> (raw)
In-Reply-To: <20200828133056.22751-1-nicolas.dichtel@6wind.com>
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>
---
drivers/net/gtp.c | 2 --
1 file changed, 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;
}
--
2.26.2
next prev parent reply other threads:[~2020-08-28 13:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-28 13:30 [PATCH net-next 0/2] gtp: minor enhancements Nicolas Dichtel
2020-08-28 13:30 ` Nicolas Dichtel [this message]
2020-08-28 13:30 ` [PATCH net-next 2/2] gtp: relax alloc constraint when adding a pdp Nicolas Dichtel
2020-08-31 19:24 ` [PATCH net-next 0/2] gtp: minor enhancements David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200828133056.22751-2-nicolas.dichtel@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=laforge@gnumonks.org \
--cc=netdev@vger.kernel.org \
--cc=osmocom-net-gprs@lists.osmocom.org \
--cc=pablo@netfilter.org \
--subject='Re: [PATCH net-next 1/2] gtp: remove useless rcu_read_lock()' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).