Skip to content

Commit d1f278d

Browse files
arkevmitchgregkh
authored andcommitted
lkdtm: replace SCSI_DISPATCH_CMD with SCSI_QUEUE_RQ
When scsi_dispatch_cmd was moved to scsi_lib.c and made static, some compilers (i.e., at least gcc 8.4.0) decided to compile this inline. This is a problem for lkdtm.ko, which inserted a kprobe on this function for the SCSI_DISPATCH_CMD crashpoint. Move this crashpoint one function up the call chain to scsi_queue_rq. Though this is also a static function, it should never be inlined because it is assigned as a structure entry. Therefore, kprobe_register should always be able to find it. Fixes: 82042a2 ("scsi: move scsi_dispatch_cmd to scsi_lib.c") Acked-by: Kees Cook <[email protected]> Signed-off-by: Kevin Mitchell <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5353dd7 commit d1f278d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Documentation/fault-injection/provoke-crashes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ recur_count
2929
cpoint_name
3030
Where in the kernel to trigger the action. It can be
3131
one of INT_HARDWARE_ENTRY, INT_HW_IRQ_EN, INT_TASKLET_ENTRY,
32-
FS_DEVRW, MEM_SWAPOUT, TIMERADD, SCSI_DISPATCH_CMD,
32+
FS_DEVRW, MEM_SWAPOUT, TIMERADD, SCSI_QUEUE_RQ,
3333
IDE_CORE_CP, or DIRECT
3434

3535
cpoint_type

drivers/misc/lkdtm/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static struct crashpoint crashpoints[] = {
8181
CRASHPOINT("FS_DEVRW", "ll_rw_block"),
8282
CRASHPOINT("MEM_SWAPOUT", "shrink_inactive_list"),
8383
CRASHPOINT("TIMERADD", "hrtimer_start"),
84-
CRASHPOINT("SCSI_DISPATCH_CMD", "scsi_dispatch_cmd"),
84+
CRASHPOINT("SCSI_QUEUE_RQ", "scsi_queue_rq"),
8585
CRASHPOINT("IDE_CORE_CP", "generic_ide_ioctl"),
8686
#endif
8787
};

0 commit comments

Comments
 (0)