linux/drivers/s390
Jaehoon Kim 54ccd92b79 s390/dasd: Return BLK_STS_INVAL for EINVAL from do_dasd_request
commit 8f4ed0ce48 upstream.

Currently, if CCW request creation fails with -EINVAL, the DASD driver
returns BLK_STS_IOERR to the block layer.

This can happen, for example, when a user-space application such as QEMU
passes a misaligned buffer, but the original cause of the error is
masked as a generic I/O error.

This patch changes the behavior so that -EINVAL is returned as
BLK_STS_INVAL, allowing user space to properly detect alignment issues
instead of interpreting them as I/O errors.

Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Cc: stable@vger.kernel.org #6.11+
Signed-off-by: Jaehoon Kim <jhkim@linux.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-10-19 16:33:57 +02:00
..
block s390/dasd: Return BLK_STS_INVAL for EINVAL from do_dasd_request 2025-10-19 16:33:57 +02:00
char s390/sclp: Fix SCCB present check 2025-08-28 16:31:06 +02:00
cio s390/cio: Update purge function to unregister the unused subchannels 2025-10-19 16:33:39 +02:00
crypto s390/ap: Unmask SLCF bit in card and queue ap functions sysfs 2025-08-15 12:14:05 +02:00
net s390/ism: fix concurrency management in ism_cmd() 2025-08-01 09:48:42 +01:00
scsi scsi: s390: zfcp: Ensure synchronous unit_add 2025-06-27 11:11:37 +01:00
virtio s390/virtio_ccw: Don't allocate/assign airqs for non-existing queues 2025-04-20 10:15:59 +02:00
Makefile s390: remove pointless drivers-y in drivers/s390/Makefile 2019-09-16 13:21:51 +02:00