lkdtm: replace ll_rw_block with submit_bh
Subsystems (4)
PATCH 1/1 lkdtm: replace ll_rw_block with submit_bh
Function ll_rw_block was removed in commit 79f597842069 ("fs/buffer:
remove ll_rw_block() helper"). There is no unified function to sumbit read or write buffer in block layer for now. Consider similar sematics, we can choose submit_bh() to replace ll_rw_block() as predefined crash point. In submit_bh(), it also takes read or write flag as the first argument and invoke submit_bio() to submit I/O request to block layer.
--- Documentation/fault-injection/provoke-crashes.rst | 2 +- drivers/misc/lkdtm/core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/fault-injection/provoke-crashes.rst +1 -1
@@ -29,7 +29,7 @@ recur_count cpoint_name Where in the kernel to trigger the action. It can be one of INT_HARDWARE_ENTRY, INT_HW_IRQ_EN, INT_TASKLET_ENTRY, - FS_DEVRW, MEM_SWAPOUT, TIMERADD, SCSI_QUEUE_RQ, or DIRECT. + FS_SUBMIT_BH, MEM_SWAPOUT, TIMERADD, SCSI_QUEUE_RQ, or DIRECT. cpoint_type Indicates the action to be taken on hitting the crash point.
drivers/misc/lkdtm/core.c +1 -1
@@ -79,7 +79,7 @@ static struct crashpoint crashpoints[] = {CRASHPOINT ("INT_HARDWARE_ENTRY" ,"do_IRQ" ),CRASHPOINT ("INT_HW_IRQ_EN" ,"handle_irq_event" ),CRASHPOINT ("INT_TASKLET_ENTRY" ,"tasklet_action" ), -CRASHPOINT ("FS_DEVRW" ,"ll_rw_block" ), +CRASHPOINT ("FS_SUBMIT_BH" ,"submit_bh" ),CRASHPOINT ("MEM_SWAPOUT" ,"shrink_inactive_list" ),CRASHPOINT ("TIMERADD" ,"hrtimer_start" ), CRASHPOINT("SCSI_QUEUE_RQ", "scsi_queue_rq"),
Signature · 1 line
2.17.1
Quoted 10 lines · Yue Zhao
Function
ll_rw_blockwas removed in commit79f597842069("fs/buffer:
removell_rw_block()helper"). There is no unified function to sumbit read or write buffer in block layer for now. Consider similar sematics, we can choosesubmit_bh()to replacell_rw_block()as predefined crash point. Insubmit_bh(), it also takes read or write flag as the first argument and invokesubmit_bio()to submit I/O request to block layer.Fixes 79f597842069 ("fs/buffer: remove ll_rw_block() helper")Signed-off-by Yue Zhao <[email protected]>
Signature · 1 line
Kees Cook