mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 03:31:26 +00:00
Fix possible crash on ABORT TASK SET TM command
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2422 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -4853,8 +4853,12 @@ static int scst_abort_task_set(struct scst_mgmt_cmd *mcmd)
|
||||
|
||||
__scst_abort_task_set(mcmd, tgt_dev);
|
||||
|
||||
if (atomic_dec_and_test(&mcmd->origin_pr_cmd->pr_abort_counter->pr_aborting_cnt))
|
||||
complete_all(&mcmd->origin_pr_cmd->pr_abort_counter->pr_aborting_cmpl);
|
||||
if (mcmd->fn == SCST_PR_ABORT_ALL) {
|
||||
struct scst_pr_abort_all_pending_mgmt_cmds_counter *pr_cnt =
|
||||
mcmd->origin_pr_cmd->pr_abort_counter;
|
||||
if (atomic_dec_and_test(&pr_cnt->pr_aborting_cnt))
|
||||
complete_all(&pr_cnt->pr_aborting_cmpl);
|
||||
}
|
||||
|
||||
tm_dbg_task_mgmt(mcmd->mcmd_tgt_dev->dev, "ABORT TASK SET/PR ABORT", 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user