linux-stable/drivers
Li Lingfeng 156eb7cd82 md: use RCU lock to protect traversal in md_spares_need_change()
[ Upstream commit 570b9147de ]

Since md_start_sync() will be called without the protect of mddev_lock,
and it can run concurrently with array reconfiguration, traversal of rdev
in it should be protected by RCU lock.
Commit bc08041b32 ("md: suspend array in md_start_sync() if array need
reconfiguration") added md_spares_need_change() to md_start_sync(),
casusing use of rdev without any protection.
Fix this by adding RCU lock in md_spares_need_change().

Fixes: bc08041b32 ("md: suspend array in md_start_sync() if array need reconfiguration")
Cc: stable@vger.kernel.org # 6.7+
Signed-off-by: Li Lingfeng <lilingfeng3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20240104133629.1277517-1-lilingfeng@huaweicloud.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-03 15:32:03 +02:00
..
accel accel/ivpu: Don't enable any tiles by default on VPU40xx 2024-02-20 16:56:21 +01:00
accessibility
acpi ACPI: HMAT: Remove register of memory node for generic target 2024-03-26 18:17:26 -04:00
amba
android binder: signal epoll threads of self-work 2024-01-31 14:08:28 -08:00
ata ata: libata-core: Do not call ata_dev_power_set_standby() twice 2024-02-21 19:09:17 +01:00
atm atm: idt77252: fix a memleak in open_card_ubr0 2024-02-03 12:46:13 +00:00
auxdisplay drm-next for 6.8: 2024-01-12 11:32:19 -08:00
base x86/rfds: Mitigate Register File Data Sampling (RFDS) 2024-03-15 10:48:13 -04:00
bcma
block aoe: fix the potential use-after-free problem in aoecmd_cfg_pkts 2024-03-26 18:16:29 -04:00
bluetooth Bluetooth: btusb: Fix memory leak 2024-03-26 18:16:54 -04:00
bus bus: mhi: ep: check the correct variable in mhi_ep_register_controller() 2024-03-26 18:17:29 -04:00
cache cache: ax45mp_cache: Align end size to cache boundary in ax45mp_dma_cache_wback() 2024-02-21 16:24:10 +00:00
cdrom
cdx
char char: xilinx_hwicap: Fix NULL vs IS_ERR() bug 2024-03-26 18:17:30 -04:00
clk clk: qcom: gcc-sdm845: Add soft dependency on rpmhpd 2024-04-03 15:32:01 +02:00
clocksource
comedi comedi: comedi_test: Prevent timers rescheduling during deletion 2024-03-05 14:21:45 +00:00
connector connector/cn_proc: revert "connector: Fix proc_event_num_listeners count not cleared" 2024-02-13 11:15:44 +01:00
counter counter: fix privdata alignment 2024-02-16 18:51:00 -05:00
cpufreq cpufreq: Fix per-policy boost behavior on SoCs using cpufreq_boost_set_sw() 2024-03-26 18:17:32 -04:00
cpuidle
crypto crypto: qat - fix ring to service map for dcc in 420xx 2024-03-26 18:17:12 -04:00
cxl cxl: Fix the incorrect assignment of SSLBIS entry pointer initial location 2024-03-26 18:17:27 -04:00
dax New code for 6.8: 2024-01-10 08:45:22 -08:00
dca
devfreq
dio
dma dmaengine: tegra210-adma: Update dependency to ARCH_TEGRA 2024-03-26 18:17:00 -04:00
dma-buf dma-buf: heaps: Don't track CMA dma-buf pages under RssFile 2024-01-31 19:54:58 +05:30
dpll dpll: fix dpll_xa_ref_*_del() for multiple registrations 2024-03-26 18:16:56 -04:00
edac Driver core changes for 6.8-rc1 2024-01-18 09:48:40 -08:00
eisa
extcon
firewire firewire: ohci: prevent leak of left-over IRQ on unbind 2024-03-06 22:35:22 +09:00
firmware x86/efistub: Don't clear BSS twice in mixed mode 2024-03-26 18:17:39 -04:00
fpga Char/Misc and other Driver changes for 6.8-rc1 2024-01-17 16:47:17 -08:00
fsi
gnss TTY/Serial changes for 6.8-rc1 2024-01-18 11:37:24 -08:00
gpio gpiolib: Pass consumer device through to core in devm_fwnode_gpiod_get_index() 2024-03-26 18:16:50 -04:00
gpu drm/vmwgfx: Fix the lifetime of the bo cursor memory 2024-04-03 15:32:02 +02:00
greybus TTY/Serial changes for 6.8-rc1 2024-01-18 11:37:24 -08:00
hid HID: amd_sfh: Avoid disabling the interrupt 2024-03-26 18:17:14 -04:00
hsi
hte
hv x86/hyperv: Use per cpu initial stack for vtl context 2024-03-26 18:17:30 -04:00
hwmon hwmon: (nct6775) Fix access to temperature configuration registers 2024-02-21 13:56:33 -08:00
hwspinlock
hwtracing hwtracing: hisi_ptt: Move type check to the beginning of hisi_ptt_pmu_event_init() 2024-03-26 18:17:30 -04:00
i2c i2c: aspeed: Fix the dummy irq expected print 2024-03-08 10:10:27 +01:00
i3c i3c: dw: Disable IBI IRQ depends on hot-join and SIR enabling 2024-03-26 18:17:24 -04:00
idle Power management updates for 6.8-rc1 2024-01-09 16:32:11 -08:00
iio iio: gts-helper: Fix division loop 2024-03-26 18:17:29 -04:00
infiniband RDMA/mana_ib: Use virtual address in dma regions for MRs 2024-03-26 18:17:26 -04:00
input Input: iqs7222 - add support for IQS7222D v1.1 and v1.2 2024-03-26 18:17:26 -04:00
interconnect interconnect: qcom: x1e80100: Add missing ACV enable_mask 2024-02-04 23:36:06 +02:00
iommu iommu: Fix compilation without CONFIG_IOMMU_INTEL 2024-03-26 18:16:55 -04:00
ipack TTY/Serial changes for 6.8-rc1 2024-01-18 11:37:24 -08:00
irqchip irqchip/gic-v3-its: Do not assume vPE tables are preallocated 2024-02-21 21:11:20 +01:00
isdn
leds leds: sgm3140: Add missing timer cleanup and flash gpio control 2024-03-26 18:17:18 -04:00
macintosh
mailbox mediatek: add CMDQ support for mt8188 2024-01-17 15:39:32 -08:00
mcb
md md: use RCU lock to protect traversal in md_spares_need_change() 2024-04-03 15:32:03 +02:00
media media: nxp: imx8-isi: Mark all crossbar sink pads as MUST_CONNECT 2024-04-03 15:32:03 +02:00
memory memory: tegra: Correct DLA client names 2024-03-26 18:16:46 -04:00
memstick
message
mfd mfd: cs42l43: Fix wrong GPIO_FN_SEL and SPI_CLK_CONFIG1 defaults 2024-03-26 18:17:17 -04:00
misc mei: vsc: Don't use sleeping condition in wait_event_timeout() 2024-03-26 18:17:30 -04:00
mmc mmc: wmt-sdmmc: remove an incorrect release_mem_region() call in the .remove function 2024-03-26 18:16:51 -04:00
most
mtd mtd: maps: sun_uflash: Declare uflash_devinit static 2024-03-26 18:17:19 -04:00
mux
net wifi: brcmfmac: avoid invalid list operation when vendor attach fails 2024-04-03 15:32:00 +02:00
nfc
ntb NTB: fix possible name leak in ntb_register_device() 2024-03-26 18:17:06 -04:00
nubus
nvdimm virtio: features, fixes 2024-01-18 16:44:03 -08:00
nvme nvme: fix reconnection fail due to reserved tag allocation 2024-03-26 18:17:33 -04:00
nvmem nvmem: include bit index in cell sysfs file name 2024-02-14 16:28:16 +01:00
of Devicetree fix for v6.8, part 2: 2024-03-01 17:18:35 -08:00
opp OPP: debugfs: Fix warning around icc_get_name() 2024-03-26 18:16:56 -04:00
parisc
parport
pci PCI: brcmstb: Fix broken brcm_pcie_mdio_write() polling 2024-03-26 18:17:20 -04:00
pcmcia
peci
perf RISC-V Fixes for 6.8-rc7 2024-03-01 12:44:33 -08:00
phy phy: qcom: qmp-usbc: handle CLAMP register in a correct way 2024-03-26 18:17:22 -04:00
pinctrl gpio: nomadik: fix offset bug in nmk_pmx_set() 2024-03-26 18:17:15 -04:00
platform platform/x86/amd/pmf: Do not use readl() for policy buffer access 2024-03-26 18:17:21 -04:00
pmdomain pmdomain: qcom: rpmhpd: Drop SA8540P gfx.lvl 2024-03-26 18:16:35 -04:00
pnp More ACPI updates for 6.8-rc1 2024-01-17 14:37:40 -08:00
power power: supply: mm8013: fix "not charging" detection 2024-03-26 18:17:17 -04:00
powercap powercap: dtpm_cpu: Fix error check against freq_qos_add_request() 2024-03-26 18:16:45 -04:00
pps
ps3
ptp
pwm pwm: dwc: use pm_sleep_ptr() macro 2024-03-26 18:16:44 -04:00
rapidio
ras
regulator regulator: userspace-consumer: add module device table 2024-03-26 18:16:50 -04:00
remoteproc remoteproc: virtio: Fix wdg cannot recovery remote processor 2024-04-03 15:32:01 +02:00
reset SoC: driver updates for 6.8 2024-01-11 11:31:46 -08:00
rpmsg
rtc rtc: max31335: fix interrupt status reg 2024-03-26 18:17:30 -04:00
s390 s390/dasd: fix double module refcount decrement 2024-03-26 18:16:27 -04:00
sbus
scsi scsi: bfa: Fix function pointer type mismatch for hcb_qe->cbfn 2024-03-26 18:17:24 -04:00
sh
siox
slimbus
soc soc: fsl: dpio: fix kcalloc() argument order 2024-03-26 18:17:32 -04:00
soundwire soundwire updates for 6.7 2024-01-18 17:08:31 -08:00
spi spi: spi-mt65xx: Fix NULL pointer access in interrupt handler 2024-03-26 18:17:38 -04:00
spmi
ssb
staging media: staging: ipu3-imgu: Set fields before media_entity_pads_init() 2024-04-03 15:32:01 +02:00
target scsi: target: pscsi: Fix bio_put() for error case 2024-02-15 14:44:07 -05:00
tc
tee tee: optee: Fix kernel panic caused by incorrect error handling 2024-03-04 09:49:03 +01:00
thermal thermal/drivers/qoriq: Fix getting tmu range 2024-03-26 18:17:31 -04:00
thunderbolt thunderbolt: Fix for v6.8-rc7 2024-03-02 19:47:01 +01:00
tty serial: max310x: fix NULL pointer dereference in I2C instantiation 2024-04-03 15:32:02 +02:00
ufs scsi: ufs: Uninitialized variable in ufshcd_devfreq_target() 2024-02-15 14:46:13 -05:00
uio
usb usb: gadget: net2272: Use irqflags in the call to net2272_probe_fin 2024-03-26 18:17:30 -04:00
vdpa vdpa/mlx5: Allow CVQ size changes 2024-03-26 18:17:35 -04:00
vfio VFIO updates for v6.8-rc1 2024-01-18 15:57:25 -08:00
vhost virtio: features, fixes 2024-01-18 16:44:03 -08:00
video backlight: lp8788: Fully initialize backlight_properties during probe 2024-03-26 18:17:19 -04:00
virt Char/Misc and other Driver changes for 6.8-rc1 2024-01-17 16:47:17 -08:00
virtio virtio: packed: fix unmap leak for indirect desc table 2024-03-26 18:17:35 -04:00
w1
watchdog watchdog: stm32_iwdg: initialize default timeout 2024-03-26 18:17:25 -04:00
xen xen/events: increment refcnt only if event channel is refcounted 2024-03-26 18:17:34 -04:00
zorro
Kconfig
Makefile fbdev/intelfb: Remove driver 2024-01-12 12:38:37 +01:00