mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 08:15:07 -04:00
Revert "gtp: annotate PDP lookups under RTNL"
This reverts commit0be5c3f0fb. Commit0be5c3f0fb("gtp: annotate PDP lookups under RTNL") added a lockdep_rtnl_is_held condition to hlist_for_each_rcu() loops to help insure that RTNL is held. Unfortunately, as pointed out by Pablo Neira Ayuso, the PDP context list is actually protected by the genetlink mutex. And so the condition is incorrect. Compile tested only. Link: https://lore.kernel.org/ak4NgOrro-4OZjz3@chamomile Signed-off-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260708-gtp-rtnl-v1-1-218091f171bc@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
d4932951a1
commit
860b693bca
@@ -151,8 +151,7 @@ static struct pdp_ctx *gtp0_pdp_find(struct gtp_dev *gtp, u64 tid, u16 family)
|
||||
|
||||
head = >p->tid_hash[gtp0_hashfn(tid) % gtp->hash_size];
|
||||
|
||||
hlist_for_each_entry_rcu(pdp, head, hlist_tid,
|
||||
lockdep_rtnl_is_held()) {
|
||||
hlist_for_each_entry_rcu(pdp, head, hlist_tid) {
|
||||
if (pdp->af == family &&
|
||||
pdp->gtp_version == GTP_V0 &&
|
||||
pdp->u.v0.tid == tid)
|
||||
@@ -169,8 +168,7 @@ static struct pdp_ctx *gtp1_pdp_find(struct gtp_dev *gtp, u32 tid, u16 family)
|
||||
|
||||
head = >p->tid_hash[gtp1u_hashfn(tid) % gtp->hash_size];
|
||||
|
||||
hlist_for_each_entry_rcu(pdp, head, hlist_tid,
|
||||
lockdep_rtnl_is_held()) {
|
||||
hlist_for_each_entry_rcu(pdp, head, hlist_tid) {
|
||||
if (pdp->af == family &&
|
||||
pdp->gtp_version == GTP_V1 &&
|
||||
pdp->u.v1.i_tei == tid)
|
||||
@@ -187,8 +185,7 @@ static struct pdp_ctx *ipv4_pdp_find(struct gtp_dev *gtp, __be32 ms_addr)
|
||||
|
||||
head = >p->addr_hash[ipv4_hashfn(ms_addr) % gtp->hash_size];
|
||||
|
||||
hlist_for_each_entry_rcu(pdp, head, hlist_addr,
|
||||
lockdep_rtnl_is_held()) {
|
||||
hlist_for_each_entry_rcu(pdp, head, hlist_addr) {
|
||||
if (pdp->af == AF_INET &&
|
||||
pdp->ms.addr.s_addr == ms_addr)
|
||||
return pdp;
|
||||
@@ -223,8 +220,7 @@ static struct pdp_ctx *ipv6_pdp_find(struct gtp_dev *gtp,
|
||||
|
||||
head = >p->addr_hash[ipv6_hashfn(ms_addr) % gtp->hash_size];
|
||||
|
||||
hlist_for_each_entry_rcu(pdp, head, hlist_addr,
|
||||
lockdep_rtnl_is_held()) {
|
||||
hlist_for_each_entry_rcu(pdp, head, hlist_addr) {
|
||||
if (pdp->af == AF_INET6 &&
|
||||
ipv6_pdp_addr_equal(&pdp->ms.addr6, ms_addr))
|
||||
return pdp;
|
||||
|
||||
Reference in New Issue
Block a user