linux/drivers/s390/block
Stefan Haberland d3a67c21b1 s390/dasd: fix Oops in dasd_alias_get_start_dev due to missing pavgroup
commit db7ba07108 upstream.

Fix Oops in dasd_alias_get_start_dev() function caused by the pavgroup
pointer being NULL.

The pavgroup pointer is checked on the entrance of the function but
without the lcu->lock being held. Therefore there is a race window
between dasd_alias_get_start_dev() and _lcu_update() which sets
pavgroup to NULL with the lcu->lock held.

Fix by checking the pavgroup pointer with lcu->lock held.

Cc: <stable@vger.kernel.org> # 2.6.25+
Fixes: 8e09f21574 ("[S390] dasd: add hyper PAV support to DASD device driver, part 1")
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
Link: https://lore.kernel.org/r/20220919154931.4123002-2-sth@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2022-09-28 11:11:54 +02:00
..
dasd.c s390/dasd: Fix read inconsistency for ESE DASD devices 2022-05-12 12:30:08 +02:00
dasd_3990_erp.c s390/dasd: Fix comment spelling 2020-03-17 20:50:19 +01:00
dasd_alias.c s390/dasd: fix Oops in dasd_alias_get_start_dev due to missing pavgroup 2022-09-28 11:11:54 +02:00
dasd_devmap.c s390/dasd: let driver core manage the sysfs attributes 2021-03-16 08:31:00 -06:00
dasd_diag.c dasd: use bvec_virt 2021-08-16 10:50:33 -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 read for ESE with blksize < 4k 2022-05-12 12:30:08 +02:00
dasd_eckd.h s390/dasd: Avoid field over-reading memcpy() 2021-07-01 09:27:04 -06:00
dasd_eer.c s390/dasd: Handle out-of-space constraint 2019-07-11 20:39:54 +02:00
dasd_erp.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dasd_fba.c dasd: use bvec_virt 2021-08-16 10:50:33 -06:00
dasd_fba.h s390/dasd: fix typo in copyright statement 2019-12-20 11:52:01 -07:00
dasd_genhd.c block: drop unused includes in <linux/genhd.h> 2022-03-16 14:23:46 +01:00
dasd_int.h s390/dasd: prevent double format of tracks for ESE devices 2022-05-12 12:30:08 +02:00
dasd_ioctl.c s390/dasd: remove debug printk 2021-07-27 09:39:14 +02:00
dasd_proc.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
dcssblk.c dcssblk: use bvec_virt 2021-08-16 10:50:33 -06:00
Kconfig s390: remove xpram device driver 2021-09-07 13:38:42 +02:00
Makefile s390: remove xpram device driver 2021-09-07 13:38:42 +02:00
scm_blk.c scm_blk: use blk_mq_alloc_disk and blk_cleanup_disk 2021-06-11 11:54:43 -06:00
scm_blk.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-13 11:47:01 -08:00
scm_drv.c s390/scm: Make struct scm_driver::remove return void 2021-07-21 11:53:42 +02:00