linux-stable/include
Paul E. McKenney dfcac203a3 rcu: Upgrade rcu_swap_protected() to rcu_replace_pointer()
[ Upstream commit a63fc6b75c ]

Although the rcu_swap_protected() macro follows the example of
swap(), the interactions with RCU make its update of its argument
somewhat counter-intuitive.  This commit therefore introduces
an rcu_replace_pointer() that returns the old value of the RCU
pointer instead of doing the argument update.  Once all the uses of
rcu_swap_protected() are updated to instead use rcu_replace_pointer(),
rcu_swap_protected() will be removed.

Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
[ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ]
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Cc: Shane M Seymour <shane.seymour@hpe.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Stable-dep-of: a616752947 ("ieee802154: hwsim: Fix possible memory leaks")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-28 10:18:38 +02:00
..
acpi ACPI: CPPC: Do not prevent CPPC from working in the future 2022-08-25 11:18:15 +02:00
asm-generic asm-generic/io.h: suppress endianness warnings for readq() and writeq() 2023-05-17 11:35:32 +02:00
clocksource
crypto crypto: drbg - make reseeding from get_random_bytes() synchronous 2022-06-22 14:11:18 +02:00
drm drm: Initialize struct drm_crtc_state.no_vblank from device settings 2023-03-11 16:43:46 +01:00
dt-bindings
keys
kvm
linux rcu: Upgrade rcu_swap_protected() to rcu_replace_pointer() 2023-06-28 10:18:38 +02:00
math-emu
media media: dvb-core: Fix use-after-free due to race at dvb_register_device() 2023-06-28 10:18:36 +02:00
misc
net ip_tunnels: allow VXLAN/GENEVE to inherit TOS/TTL from VLAN 2023-06-28 10:18:37 +02:00
pcmcia
ras
rdma
scsi scsi: stex: Properly zero out the passthrough command structure 2022-10-15 07:54:39 +02:00
soc firmware: raspberrypi: Introduce devm_rpi_firmware_get() 2023-05-17 11:35:52 +02:00
sound ASoC: soc-dapm.h: fixup warning struct snd_pcm_substream not declared 2023-03-11 16:43:48 +01:00
target
trace writeback: fix dereferencing NULL mapping->host on writeback_page_template 2023-06-28 10:18:37 +02:00
uapi Remove DECnet support from kernel 2023-06-21 15:44:10 +02:00
vdso
video video: of_display_timing.h: include errno.h 2022-07-12 16:30:47 +02:00
xen dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00