linux/drivers/s390/block
Stefan Haberland 6deb8727f2 s390/dasd: print copy pair message only for the correct error
commit 856d8e3c63 upstream.

The DASD driver has certain types of requests that might be rejected by
the storage server or z/VM because they are not supported. Since the
missing support of the command is not a real issue there is no user
visible kernel error message for this.

For copy pair setups  there is a specific error that IO is not allowed on
secondary devices. This error case is explicitly handled and an error
message is printed.

The code checking for the error did use a bitwise 'and' that is used to
check for specific bits. But in this case the whole sense byte has to
match.

This leads to the problem that the copy pair related error message is
erroneously printed for other error cases that are usually not reported.
This might heavily confuse users and lead to follow on actions that might
disrupt application processing.

Fix by checking the sense byte for the exact value and not single bits.

Cc: stable@vger.kernel.org # 6.1+
Fixes: 1fca631a11 ("s390/dasd: suppress generic error messages for PPRC secondary devices")
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
Link: https://lore.kernel.org/r/20230721193647.3889634-5-sth@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2023-08-03 10:24:16 +02:00
..
dasd.c s390/dasd: fix hanging blockdevice after request requeue 2023-05-11 23:03:40 +09:00
dasd_3990_erp.c s390/dasd: print copy pair message only for the correct error 2023-08-03 10:24:16 +02:00
dasd_alias.c s390/dasd: fix Oops in dasd_alias_get_start_dev due to missing pavgroup 2022-09-19 10:19:28 -06:00
dasd_devmap.c s390/dasd: fix possible buffer overflow in copy_pair_show 2022-11-23 10:37:37 -07:00
dasd_diag.c s390/dasd: use blk_mq_alloc_disk 2022-09-28 08:56:34 -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 command reject error on ESE devices 2023-05-24 17:32:52 +01:00
dasd_eckd.h s390/dasd: add device ping attribute 2022-09-21 08:32:51 -06:00
dasd_eer.c s390: move from strlcpy with unused retval to strscpy 2022-08-30 22:00:33 +02:00
dasd_erp.c s390/dasd: handle request magic consistently as unsigned int 2021-10-20 08:10:41 -06:00
dasd_fba.c s390/dasd: use blk_mq_alloc_disk 2022-09-28 08:56:34 -06:00
dasd_fba.h s390/dasd: fix typo in copyright statement 2019-12-20 11:52:01 -07:00
dasd_genhd.c s390/dasd: use blk_mq_alloc_disk 2022-09-28 08:56:34 -06:00
dasd_int.h s390/dasd: use blk_mq_alloc_disk 2022-09-28 08:56:34 -06:00
dasd_ioctl.c s390/dasd: fix hanging device after quiesce/resume 2023-08-03 10:24:16 +02:00
dasd_proc.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
dcssblk.c block: handle bio_split_to_limits() NULL return 2023-01-18 11:58:33 +01: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: remove blk_cleanup_disk 2022-06-28 06:33:15 -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