linux-stable/drivers/s390
Peter Oberparleiter 559f3a6333 s390/cio: fix race condition during online processing
[ Upstream commit 2d8527f2f9 ]

A race condition exists in ccw_device_set_online() that can cause the
online process to fail, leaving the affected device in an inconsistent
state. As a result, subsequent attempts to set that device online fail
with return code ENODEV.

The problem occurs when a path verification request arrives after
a wait for final device state completed, but before the result state
is evaluated.

Fix this by ensuring that the CCW-device lock is held between
determining final state and checking result state.

Note that since:

commit 2297791c92 ("s390/cio: dont unregister subchannel from child-drivers")

path verification requests are much more likely to occur during boot,
resulting in an increased chance of this race condition occurring.

Fixes: 2297791c92 ("s390/cio: dont unregister subchannel from child-drivers")
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-27 17:07:09 +02:00
..
block s390/dasd: fix double module refcount decrement 2024-03-26 18:20:28 -04:00
char
cio s390/cio: fix race condition during online processing 2024-04-27 17:07:09 +02:00
crypto s390/zcrypt: fix reference counting on zcrypt card objects 2024-04-03 15:19:36 +02:00
net s390/qeth: handle deferred cc1 2024-04-10 16:28:21 +02:00
scsi scsi: zfcp: Fix a double put in zfcp_port_enqueue() 2023-10-10 22:00:38 +02:00
virtio
Makefile