linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/14] Remove redundant rcu_read_lock/unlock() in spin_lock
@ 2025-09-16  4:47 pengdonglin
  2025-09-16  4:47 ` [PATCH v3 01/14] ACPI: APEI: " pengdonglin
                   ` (13 more replies)
  0 siblings, 14 replies; 21+ messages in thread
From: pengdonglin @ 2025-09-16  4:47 UTC (permalink / raw)
  To: tj, tony.luck, jani.nikula, ap420073, jv, freude, bcrl, trondmy,
	longman, kees
  Cc: bigeasy, hdanton, paulmck, linux-kernel, linux-rt-devel,
	linux-nfs, linux-aio, linux-fsdevel, linux-security-module,
	netdev, intel-gfx, linux-wireless, linux-acpi, linux-s390,
	cgroups, pengdonglin

Since commit a8bb74acd8efe ("rcu: Consolidate RCU-sched update-side function definitions")
there is no difference between rcu_read_lock(), rcu_read_lock_bh() and
rcu_read_lock_sched() in terms of RCU read section and the relevant grace
period. That means that spin_lock(), which implies rcu_read_lock_sched(),
also implies rcu_read_lock().

There is no need no explicitly start a RCU read section if one has already
been started implicitly by spin_lock().

Simplify the code and remove the inner rcu_read_lock() invocation.

[1] https://elixir.bootlin.com/linux/v6.17-rc5/source/Documentation/RCU/rcu_dereference.rst#L407
[2] https://lore.kernel.org/lkml/20180829222021.GA29944@linux.vnet.ibm.com/
[3] https://lwn.net/Articles/777036/
[4] https://lore.kernel.org/lkml/6435833a-bdcb-4114-b29d-28b7f436d47d@paulmck-laptop/

pengdonglin (14):
  ACPI: APEI: Remove redundant rcu_read_lock/unlock() in spin_lock
  drm/i915/gt: Remove redundant rcu_read_lock/unlock() in spin_lock
  fs: aio: Remove redundant rcu_read_lock/unlock() in spin_lock
  nfs: Remove redundant rcu_read_lock/unlock() in spin_lock
  s390/pkey: Remove redundant rcu_read_lock/unlock() in spin_lock
  ipc: Remove redundant rcu_read_lock/unlock() in spin_lock
  yama: Remove redundant rcu_read_lock/unlock() in spin_lock
  cgroup: Remove redundant rcu_read_lock/unlock() in spin_lock
  cgroup/cpuset: Remove redundant rcu_read_lock/unlock() in spin_lock
  wifi: mac80211: Remove redundant rcu_read_lock/unlock() in spin_lock
  net: ncsi: Remove redundant rcu_read_lock/unlock() in spin_lock
  net: amt: Remove redundant rcu_read_lock/unlock() in spin_lock
  net: bonding: Remove redundant rcu_read_lock/unlock() in spin_lock
  wifi: ath9k: Remove redundant rcu_read_lock/unlock() in spin_lock

 drivers/acpi/apei/ghes.c                        |  2 --
 drivers/gpu/drm/i915/gt/intel_ring_submission.c |  2 --
 drivers/net/amt.c                               |  8 --------
 drivers/net/bonding/bond_3ad.c                  |  2 --
 drivers/net/wireless/ath/ath9k/xmit.c           |  2 --
 drivers/s390/crypto/pkey_base.c                 |  3 ---
 fs/aio.c                                        |  6 ++----
 fs/nfs/callback_proc.c                          |  2 --
 fs/nfs/nfs4state.c                              |  2 --
 fs/nfs/pnfs.c                                   | 12 +-----------
 fs/nfs/pnfs_dev.c                               |  4 ----
 ipc/msg.c                                       |  1 -
 ipc/sem.c                                       |  1 -
 ipc/shm.c                                       |  1 -
 ipc/util.c                                      |  2 --
 kernel/cgroup/cgroup.c                          |  2 --
 kernel/cgroup/cpuset.c                          |  6 ------
 kernel/cgroup/debug.c                           |  4 ----
 net/mac80211/cfg.c                              |  2 --
 net/mac80211/debugfs.c                          |  2 --
 net/mac80211/debugfs_netdev.c                   |  2 --
 net/mac80211/debugfs_sta.c                      |  2 --
 net/mac80211/sta_info.c                         |  2 --
 net/ncsi/ncsi-manage.c                          |  2 --
 security/yama/yama_lsm.c                        |  4 ----
 25 files changed, 3 insertions(+), 75 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2025-09-28 10:33 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-16  4:47 [PATCH v3 00/14] Remove redundant rcu_read_lock/unlock() in spin_lock pengdonglin
2025-09-16  4:47 ` [PATCH v3 01/14] ACPI: APEI: " pengdonglin
2025-09-27  3:22   ` Hanjun Guo
2025-09-28 10:33     ` Rafael J. Wysocki
2025-09-16  4:47 ` [PATCH v3 02/14] drm/i915/gt: " pengdonglin
2025-09-16  4:47 ` [PATCH v3 03/14] fs: aio: " pengdonglin
2025-09-16  4:47 ` [PATCH v3 04/14] nfs: " pengdonglin
2025-09-16  4:47 ` [PATCH v3 05/14] s390/pkey: " pengdonglin
2025-09-16 10:51   ` Harald Freudenberger
2025-09-16  4:47 ` [PATCH v3 06/14] ipc: " pengdonglin
2025-09-16  4:47 ` [PATCH v3 07/14] yama: " pengdonglin
2025-09-16  4:47 ` [PATCH v3 08/14] cgroup: " pengdonglin
2025-09-16 18:37   ` Tejun Heo
2025-09-16  4:47 ` [PATCH v3 09/14] cgroup/cpuset: " pengdonglin
2025-09-16 18:37   ` Tejun Heo
2025-09-16  4:47 ` [PATCH v3 10/14] wifi: mac80211: " pengdonglin
2025-09-16  4:47 ` [PATCH v3 11/14] net: ncsi: " pengdonglin
2025-09-16  9:41   ` Paul Fertser
2025-09-16  4:47 ` [PATCH v3 12/14] net: amt: " pengdonglin
2025-09-16  4:47 ` [PATCH v3 13/14] net: bonding: " pengdonglin
2025-09-16  4:47 ` [PATCH v3 14/14] wifi: ath9k: " pengdonglin

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).