summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/st.c
diff options
context:
space:
mode:
authorLinus Torvalds2015-07-19 23:18:00 +0200
committerLinus Torvalds2015-07-19 23:18:00 +0200
commitfdbd55fdde3155a53ee90a60cdc0a4c7ac4f236b (patch)
tree42cc0005ee1f75dd90a50bc9c00ea7a20233d956 /drivers/scsi/st.c
parentMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus (diff)
parentscsi: fix host max depth checking for the 'queue_depth' sysfs interface (diff)
downloadkernel-qcow2-linux-fdbd55fdde3155a53ee90a60cdc0a4c7ac4f236b.tar.gz
kernel-qcow2-linux-fdbd55fdde3155a53ee90a60cdc0a4c7ac4f236b.tar.xz
kernel-qcow2-linux-fdbd55fdde3155a53ee90a60cdc0a4c7ac4f236b.zip
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley: "Two fairly simple fixes: one is a change that causes us to have a very low queue depth leading to performance issues and the other is a null deref occasionally in tapes thanks to use after put" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: fix host max depth checking for the 'queue_depth' sysfs interface st: null pointer dereference panic caused by use after kref_put by st_open
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r--drivers/scsi/st.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 3f25b8fa921d..871f3553987d 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -1329,9 +1329,9 @@ static int st_open(struct inode *inode, struct file *filp)
spin_lock(&st_use_lock);
STp->in_use = 0;
spin_unlock(&st_use_lock);
- scsi_tape_put(STp);
if (resumed)
scsi_autopm_put_device(STp->device);
+ scsi_tape_put(STp);
return retval;
}