From 4e5548c4098549cdb1f2eac1a2c1bf495180422e Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 12 Aug 2019 01:39:37 +0000 Subject: [PATCH] scst: Verify dev_exec_cmd_list protection at runtime git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8500 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_targ.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index bee0ae2de..aa5c563b0 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -338,6 +338,8 @@ bool scst_do_check_blocked_dev(struct scst_cmd *cmd) TRACE_ENTRY(); + lockdep_assert_held(&dev->dev_lock); + /* * We want to have fairness between just unblocked previously blocked * SCSI atomic cmds and new cmds came after them. Otherwise, the new @@ -482,6 +484,8 @@ void __scst_check_unblock_dev(struct scst_cmd *cmd) TRACE_ENTRY(); + lockdep_assert_held(&dev->dev_lock); + /* * We might be called here as part of Copy Manager's check blocking * undo, so restore all flags in the previous state to allow