]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/dasd: Return BLK_STS_INVAL for EINVAL from do_dasd_request
authorJaehoon Kim <jhkim@linux.ibm.com>
Thu, 25 Sep 2025 15:47:07 +0000 (17:47 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 25 Sep 2025 16:34:30 +0000 (10:34 -0600)
commit8f4ed0ce4857ceb444174503fc9058720d4faaa1
treede91fd179e43832e87cd159b5d313a3a2be316db
parentf85e254b51aeadf8dc367aaf2fbd2c20378f75c2
s390/dasd: Return BLK_STS_INVAL for EINVAL from do_dasd_request

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>
drivers/s390/block/dasd.c