linux/drivers/s390/block
Gerald Schaefer a41a11b400 s390/dcssblk: fix deadlock when adding a DCSS
After the rework from commit 1ebe2e5f9d ("block: remove
GENHD_FL_EXT_DEVT"), when calling device_add_disk(), dcssblk will end up
in disk_scan_partitions(), and not break out early w/o GENHD_FL_NO_PART.
This will trigger implicit open/release via blkdev_get/put_whole()
later. dcssblk_release() will then deadlock on dcssblk_devices_sem
semaphore, which is already held from dcssblk_add_store() when calling
device_add_disk().

dcssblk does not support partitions (DCSSBLK_MINORS_PER_DISK == 1), and
never scanned partitions before. Therefore restore the previous
behavior, and explicitly disallow partition scanning by setting the
GENHD_FL_NO_PART flag. This will also prevent this deadlock scenario.

Fixes: 1ebe2e5f9d ("block: remove GENHD_FL_EXT_DEVT")
Cc: <stable@vger.kernel.org> # 5.17+
Signed-off-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2022-11-16 11:39:11 +01:00
..
dasd_3990_erp.c s390/dasd: suppress generic error messages for PPRC secondary devices 2022-09-21 08:32:51 -06: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 updates for the 6.1 merge window 2022-10-09 13:51:40 -07:00
dasd_diag.c s390/dasd: use blk_mq_alloc_disk 2022-09-28 08:56:34 -06:00
dasd_diag.h
dasd_eckd.c s390/dasd: use blk_mq_alloc_disk 2022-09-28 08:56:34 -06: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: add ioctl to perform a swap of the drivers copy pair 2022-09-21 08:32:51 -06:00
dasd_proc.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
dasd.c s390/dasd: use blk_mq_alloc_disk 2022-09-28 08:56:34 -06:00
dcssblk.c s390/dcssblk: fix deadlock when adding a DCSS 2022-11-16 11:39:11 +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