linux/drivers/s390/block
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
..
dasd.c s390/dasd: Return BLK_STS_INVAL for EINVAL from do_dasd_request 2025-10-19 16:33:57 +02:00
dasd_3990_erp.c s390/dasd: fix error recovery leading to data corruption on ESE devices 2024-08-12 10:31:08 -06:00
dasd_alias.c s390/dasd: use new address translation helpers 2024-03-13 09:23:46 +01:00
dasd_devmap.c s390/dasd: fix error checks in dasd_copy_pair_store() 2024-07-15 10:57:39 -06:00
dasd_diag.c s390/dasd: add missing MODULE_DESCRIPTION() macros 2024-07-15 10:57:39 -06:00
dasd_diag.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dasd_eckd.c s390/dasd: fix error recovery leading to data corruption on ESE devices 2024-08-12 10:31:08 -06:00
dasd_eckd.h s390/dasd: add device ping attribute 2022-09-21 08:32:51 -06:00
dasd_eer.c s390/dasd: use new address translation helpers 2024-03-13 09:23:46 +01:00
dasd_erp.c s390/dasd: Remove PRINTK_HEADER and KMSG_COMPONENT definitions 2024-02-08 10:12:01 -07:00
dasd_fba.c for-6.11/block-20240722 2024-07-22 11:32:05 -07:00
dasd_fba.h s390/dasd: fix typo in copyright statement 2019-12-20 11:52:01 -07:00
dasd_genhd.c s390/dasd: Remove DMA alignment 2024-08-12 10:31:08 -06:00
dasd_int.h s390/dasd: fix error recovery leading to data corruption on ESE devices 2024-08-12 10:31:08 -06:00
dasd_ioctl.c dasd_format(): killing the last remaining user of ->bd_inode 2024-05-03 02:36:56 -04:00
dasd_proc.c s390/dasd: Remove PRINTK_HEADER and KMSG_COMPONENT definitions 2024-02-08 10:12:01 -07:00
dcssblk.c s390 updates for 6.11 merge window 2024-07-18 15:41:45 -07:00
Kconfig dax: remove CONFIG_DAX_DRIVER 2021-12-04 08:58:51 -08:00
Makefile s390: remove xpram device driver 2021-09-07 13:38:42 +02:00
scm_blk.c block: move the add_random flag to queue_limits 2024-06-19 07:58:28 -06:00
scm_blk.h block: remove genhd.h 2022-02-02 07:49:59 -07:00
scm_drv.c s390/scm: Make struct scm_driver::remove return void 2021-07-21 11:53:42 +02:00