acrn-kernel/drivers/s390/block
Jan Höppner 1e1e2ee0cf 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>
2023-06-14 11:15:27 +02:00
..
Kconfig
Makefile
dasd.c
dasd_3990_erp.c
dasd_alias.c
dasd_devmap.c
dasd_diag.c
dasd_diag.h
dasd_eckd.c
dasd_eckd.h
dasd_eer.c
dasd_erp.c
dasd_fba.c
dasd_fba.h
dasd_genhd.c
dasd_int.h
dasd_ioctl.c
dasd_proc.c
dcssblk.c
scm_blk.c
scm_blk.h
scm_drv.c