android_kernel_samsung_sm8650/drivers/s390
Jan Höppner 1e1e2ee0cf s390/dasd: Use correct lock while counting channel queue length
commit ccc45cb4e7271c74dbb27776ae8f73d84557f5c6 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>
2023-06-14 11:15:27 +02:00
..
block s390/dasd: Use correct lock while counting channel queue length 2023-06-14 11:15:27 +02:00
char s390/early: fix sclp_early_sccb variable lifetime 2023-03-10 09:32:53 +01:00
cio s390/qdio: fix do_sqbs() inline assembly constraint 2023-05-24 17:32:52 +01:00
crypto s390/pkey: zeroize key blobs 2023-06-09 10:34:13 +02:00
net s390/lcs: Fix return type of lcs_start_xmit() 2022-12-31 13:33:01 +01:00
scsi scsi: zfcp: Fix double free of FSF request when qdio send fails 2022-11-17 17:51:06 +00:00
virtio virtio: Revert "virtio: find_vqs() add arg sizes" 2022-08-16 01:40:24 -04:00
Makefile s390: remove pointless drivers-y in drivers/s390/Makefile 2019-09-16 13:21:51 +02:00