Skip to content

Commit c0c8a83

Browse files
Stefan Haberlandaxboe
authored andcommitted
s390/dasd: add missing discipline function
Fix crash with illegal operation exception in dasd_device_tasklet. Commit b729493 ("s390/dasd: Prepare for additional path event handling") renamed the verify_path function for ECKD but not for FBA and DIAG. This leads to a panic when the path verification function is called for a FBA or DIAG device. Fix by defining a wrapper function for dasd_generic_verify_path(). Fixes: b729493 ("s390/dasd: Prepare for additional path event handling") Cc: <[email protected]> Rust-for-Linux#5.11 Reviewed-by: Jan Hoeppner <[email protected]> Signed-off-by: Stefan Haberland <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent bc6a385 commit c0c8a83

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

drivers/s390/block/dasd_diag.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,12 +642,18 @@ static void dasd_diag_setup_blk_queue(struct dasd_block *block)
642642
blk_queue_segment_boundary(q, PAGE_SIZE - 1);
643643
}
644644

645+
static int dasd_diag_pe_handler(struct dasd_device *device,
646+
__u8 tbvpm, __u8 fcsecpm)
647+
{
648+
return dasd_generic_verify_path(device, tbvpm);
649+
}
650+
645651
static struct dasd_discipline dasd_diag_discipline = {
646652
.owner = THIS_MODULE,
647653
.name = "DIAG",
648654
.ebcname = "DIAG",
649655
.check_device = dasd_diag_check_device,
650-
.verify_path = dasd_generic_verify_path,
656+
.pe_handler = dasd_diag_pe_handler,
651657
.fill_geometry = dasd_diag_fill_geometry,
652658
.setup_blk_queue = dasd_diag_setup_blk_queue,
653659
.start_IO = dasd_start_diag,

drivers/s390/block/dasd_fba.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,13 +794,19 @@ static void dasd_fba_setup_blk_queue(struct dasd_block *block)
794794
blk_queue_flag_set(QUEUE_FLAG_DISCARD, q);
795795
}
796796

797+
static int dasd_fba_pe_handler(struct dasd_device *device,
798+
__u8 tbvpm, __u8 fcsecpm)
799+
{
800+
return dasd_generic_verify_path(device, tbvpm);
801+
}
802+
797803
static struct dasd_discipline dasd_fba_discipline = {
798804
.owner = THIS_MODULE,
799805
.name = "FBA ",
800806
.ebcname = "FBA ",
801807
.check_device = dasd_fba_check_characteristics,
802808
.do_analysis = dasd_fba_do_analysis,
803-
.verify_path = dasd_generic_verify_path,
809+
.pe_handler = dasd_fba_pe_handler,
804810
.setup_blk_queue = dasd_fba_setup_blk_queue,
805811
.fill_geometry = dasd_fba_fill_geometry,
806812
.start_IO = dasd_start_IO,

drivers/s390/block/dasd_int.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ struct dasd_discipline {
297297
* e.g. verify that new path is compatible with the current
298298
* configuration.
299299
*/
300-
int (*verify_path)(struct dasd_device *, __u8);
301300
int (*pe_handler)(struct dasd_device *, __u8, __u8);
302301

303302
/*

0 commit comments

Comments
 (0)