Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
"Two core changes and the rest in drivers, one core change to quirk the
behaviour of the Iomega Zip drive and one to fix a hang caused by tag
reallocation problems, which has mostly been seen by the iscsi client.

Note the latter fixes the problem but still has a slight sysfs memory
leak, so will be amended in the next pull request (once we've run the
fix for the fix through our testing)"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: target: Fix recursive locking in __configfs_open_file()
scsi: devinfo: Add BLIST_SKIP_IO_HINTS for Iomega ZIP
scsi: mpi3mr: Clear reset history on ready and recheck state after timeout
scsi: core: Fix refcount leak for tagset_refcnt

+18 -10
+10
drivers/scsi/mpi3mr/mpi3mr_fw.c
··· 1618 1618 ioc_info(mrioc, 1619 1619 "successfully transitioned to %s state\n", 1620 1620 mpi3mr_iocstate_name(ioc_state)); 1621 + mpi3mr_clear_reset_history(mrioc); 1621 1622 return 0; 1622 1623 } 1623 1624 ioc_status = readl(&mrioc->sysif_regs->ioc_status); ··· 1637 1636 msleep(100); 1638 1637 elapsed_time_sec = jiffies_to_msecs(jiffies - start_time)/1000; 1639 1638 } while (elapsed_time_sec < mrioc->ready_timeout); 1639 + 1640 + ioc_state = mpi3mr_get_iocstate(mrioc); 1641 + if (ioc_state == MRIOC_STATE_READY) { 1642 + ioc_info(mrioc, 1643 + "successfully transitioned to %s state after %llu seconds\n", 1644 + mpi3mr_iocstate_name(ioc_state), elapsed_time_sec); 1645 + mpi3mr_clear_reset_history(mrioc); 1646 + return 0; 1647 + } 1640 1648 1641 1649 out_failed: 1642 1650 elapsed_time_sec = jiffies_to_msecs(jiffies - start_time)/1000;
+1 -1
drivers/scsi/scsi_devinfo.c
··· 190 190 {"IBM", "2076", NULL, BLIST_NO_VPD_SIZE}, 191 191 {"IBM", "2105", NULL, BLIST_RETRY_HWERROR}, 192 192 {"iomega", "jaz 1GB", "J.86", BLIST_NOTQ | BLIST_NOLUN}, 193 - {"IOMEGA", "ZIP", NULL, BLIST_NOTQ | BLIST_NOLUN}, 193 + {"IOMEGA", "ZIP", NULL, BLIST_NOTQ | BLIST_NOLUN | BLIST_SKIP_IO_HINTS}, 194 194 {"IOMEGA", "Io20S *F", NULL, BLIST_KEY}, 195 195 {"INSITE", "Floptical F*8I", NULL, BLIST_KEY}, 196 196 {"INSITE", "I325VM", NULL, BLIST_KEY},
+1
drivers/scsi/scsi_scan.c
··· 361 361 * since we use this queue depth most of times. 362 362 */ 363 363 if (scsi_realloc_sdev_budget_map(sdev, depth)) { 364 + kref_put(&sdev->host->tagset_refcnt, scsi_mq_free_tags); 364 365 put_device(&starget->dev); 365 366 kfree(sdev); 366 367 goto out;
+6 -9
drivers/target/target_core_configfs.c
··· 108 108 const char *page, size_t count) 109 109 { 110 110 ssize_t read_bytes; 111 - struct file *fp; 112 111 ssize_t r = -EINVAL; 112 + struct path path = {}; 113 113 114 114 mutex_lock(&target_devices_lock); 115 115 if (target_devices) { ··· 131 131 db_root_stage[read_bytes - 1] = '\0'; 132 132 133 133 /* validate new db root before accepting it */ 134 - fp = filp_open(db_root_stage, O_RDONLY, 0); 135 - if (IS_ERR(fp)) { 134 + r = kern_path(db_root_stage, LOOKUP_FOLLOW | LOOKUP_DIRECTORY, &path); 135 + if (r) { 136 136 pr_err("db_root: cannot open: %s\n", db_root_stage); 137 + if (r == -ENOTDIR) 138 + pr_err("db_root: not a directory: %s\n", db_root_stage); 137 139 goto unlock; 138 140 } 139 - if (!S_ISDIR(file_inode(fp)->i_mode)) { 140 - filp_close(fp, NULL); 141 - pr_err("db_root: not a directory: %s\n", db_root_stage); 142 - goto unlock; 143 - } 144 - filp_close(fp, NULL); 141 + path_put(&path); 145 142 146 143 strscpy(db_root, db_root_stage); 147 144 pr_debug("Target_Core_ConfigFS: db_root set to %s\n", db_root);