diff options
author | Jan Höppner | 2023-06-09 17:37:50 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-06-14 11:15:27 +0200 |
commit | 1e1e2ee0cf7fae4d69583a86111e720ff9637ee7 (patch) | |
tree | 030497d909e49842651b46abd18c7a6a46763415 /drivers/s390/cio | |
parent | 6f5c0eec89fc6f0c8ee6e8de8a72b7280837534f (diff) |
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
583d6535cb9d ("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: 583d6535cb9d ("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>
Diffstat (limited to 'drivers/s390/cio')
0 files changed, 0 insertions, 0 deletions