linux/drivers/s390
Jan Höppner 36482bf16f s390/dasd: Use correct lock while counting channel queue length
commit ccc45cb4e7 upstream.

The lock around counting the channel queue length in the BIODASDINFO
ioctl was incorrectly changed to the dasd_block->queue_lock with commit
583d6535cb ("dasd: remove dead code"). This can lead to endless list
iterations and a subsequent crash.

The queue_lock is supposed to be used only for queue lists belonging to
dasd_block. For dasd_device related queue lists the ccwdev lock must be
used.

Fix the mentioned issues by correctly using the ccwdev lock instead of
the queue lock.

Fixes: 583d6535cb ("dasd: remove dead code")
Cc: stable@vger.kernel.org # v5.0+
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Link: https://lore.kernel.org/r/20230609153750.1258763-2-sth@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2023-06-14 11:13:06 +02:00
..
block s390/dasd: Use correct lock while counting channel queue length 2023-06-14 11:13:06 +02:00
char s390/zcore: fix race when reading from hardware system area 2022-08-17 14:24:10 +02:00
cio s390/qdio: fix do_sqbs() inline assembly constraint 2023-05-24 17:36:55 +01:00
crypto s390/pkey: zeroize key blobs 2023-06-09 10:32:24 +02:00
net s390/lcs: Fix return type of lcs_start_xmit() 2022-12-31 13:14:41 +01:00
scsi scsi: zfcp: Fix double free of FSF request when qdio send fails 2022-11-26 09:24:47 +01:00
virtio virtio/s390: get rid of open-coded kvm hypercall 2021-06-28 11:18:28 +02:00
Makefile s390: remove pointless drivers-y in drivers/s390/Makefile 2019-09-16 13:21:51 +02:00