SCSI fixes on 20150719
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. Signed-off-by: James Bottomley <JBottomley@Odin.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABAgAGBQJVq2/DAAoJEDeqqVYsXL0MhqoH/2ZlycWVQ2ZQyC9k2UWjAS7t By0ufRZKeaxgwriVWZqTCE3QHfqqeR5tNNSvk26k+CJTS6nyVGX+g8cxLQJf1gey DyAi9za+5P5SwYFuJxzULyZddTyeshoZplVvRwjd1/gnRUJXybuO+HRkYzaROd5e 7snX56jGt1MzpmIrO2wln24pFLVfdC5JivzUcXgYecHD/XZuzOEdZE1dCxONXy27 rTeqYayIGLFo7vhSt9J9ViF0QiU6ahCKmQ/TDsv3Sq1zg228E7DAmlzVAo2NCwLM gelTRHRdO4rwwkehZH8QIdUI77MzgmwQIU4nZp3FBG9SWrIEPHaRpiDxCHr3UE0= =bfE2 -----END PGP SIGNATURE----- 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
This commit is contained in:
Коммит
fdbd55fdde
|
@ -859,7 +859,7 @@ sdev_store_queue_depth(struct device *dev, struct device_attribute *attr,
|
|||
|
||||
depth = simple_strtoul(buf, NULL, 0);
|
||||
|
||||
if (depth < 1 || depth > sht->can_queue)
|
||||
if (depth < 1 || depth > sdev->host->can_queue)
|
||||
return -EINVAL;
|
||||
|
||||
retval = sht->change_queue_depth(sdev, depth);
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче