diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-08-31 07:17:17 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-08-31 07:17:17 +0200 |
| commit | dd5597245d35cfbb0890b8a868028aa1d2018701 (patch) | |
| tree | 865b93bf83987840fd763bf8a3d1c615ccda2f7b /drivers/scsi/scsi_debug.c | |
| parent | 551b6729578a8981c46af964c10bf7d5d9ddca83 (diff) | |
| parent | f75aef392f869018f78cfedf3c320a6b3fcfda6b (diff) | |
Merge 5.9-rc3 into char-misc-next
We need the fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
| -rw-r--r-- | drivers/scsi/scsi_debug.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 064ed680c053..139f0073da37 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -5490,9 +5490,11 @@ static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info *devip, u64 d = ktime_get_boottime_ns() - ns_from_boot; if (kt <= d) { /* elapsed duration >= kt */ + spin_lock_irqsave(&sqp->qc_lock, iflags); sqcp->a_cmnd = NULL; atomic_dec(&devip->num_in_q); clear_bit(k, sqp->in_use_bm); + spin_unlock_irqrestore(&sqp->qc_lock, iflags); if (new_sd_dp) kfree(sd_dp); /* call scsi_done() from this thread */ |
