aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/cdns3/cdns3-trace.h
diff options
context:
space:
mode:
authorKuniyuki Iwashima <[email protected]>2025-07-16 22:08:12 +0000
committerJakub Kicinski <[email protected]>2025-07-17 23:25:20 +0000
commitd539d8fbd8fcf64a1492c51f5ee99aaa8a8dc9ab (patch)
treedda874417e9d21e8e3bc0358a02b31da5401c9ea /drivers/usb/cdns3/cdns3-trace.h
parentneighbour: Annotate neigh_table.phash_buckets and pneigh_entry.next with __rcu. (diff)
downloadkernel-d539d8fbd8fcf64a1492c51f5ee99aaa8a8dc9ab.tar.gz
kernel-d539d8fbd8fcf64a1492c51f5ee99aaa8a8dc9ab.zip
neighbour: Free pneigh_entry after RCU grace period.
We will convert RTM_GETNEIGH to RCU. neigh_get() looks up pneigh_entry by pneigh_lookup() and passes it to pneigh_fill_info(). Then, we must ensure that the entry is alive till pneigh_fill_info() completes, but read_lock_bh(&tbl->lock) in pneigh_lookup() does not guarantee that. Also, we will convert all readers of tbl->phash_buckets[] to RCU. Let's use call_rcu() to free pneigh_entry and update phash_buckets[] and ->next by rcu_assign_pointer(). pneigh_ifdown_and_unlock() uses list_head to avoid overwriting ->next and moving RCU iterators to another list. pndisc_destructor() (only IPv6 ndisc uses this) uses a mutex, so it is not delayed to call_rcu(), where we cannot sleep. This is fine because the mcast code works with RCU and ipv6_dev_mc_dec() frees mcast objects after RCU grace period. While at it, we change the return type of pneigh_ifdown_and_unlock() to void. Signed-off-by: Kuniyuki Iwashima <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-trace.h')
0 files changed, 0 insertions, 0 deletions