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:
"Eight fixes, all in drivers, all fairly minor either being fixes in
error legs, memory leaks on teardown, context errors or semantic
problems"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: mpt3sas: Do not use GFP_KERNEL in atomic context
scsi: ufs: ufs-mediatek: Correct operator & -> &&
scsi: sd_zbc: Update write pointer offset cache
scsi: lpfc: Fix some error codes in debugfs
scsi: qla2xxx: Fix broken #endif placement
scsi: st: Fix a use after free in st_open()
scsi: myrs: Fix a double free in myrs_cleanup()
scsi: ibmvfc: Free channel_setup_buf during device tear down

+20 -15
+2
drivers/scsi/ibmvscsi/ibmvfc.c
··· 5784 5784 vhost->disc_buf_dma); 5785 5785 dma_free_coherent(vhost->dev, sizeof(*vhost->login_buf), 5786 5786 vhost->login_buf, vhost->login_buf_dma); 5787 + dma_free_coherent(vhost->dev, sizeof(*vhost->channel_setup_buf), 5788 + vhost->channel_setup_buf, vhost->channel_setup_dma); 5787 5789 dma_pool_destroy(vhost->sg_pool); 5788 5790 ibmvfc_free_queue(vhost, async_q); 5789 5791 LEAVE;
+2 -2
drivers/scsi/lpfc/lpfc_debugfs.c
··· 2421 2421 memset(dstbuf, 0, 33); 2422 2422 size = (nbytes < 32) ? nbytes : 32; 2423 2423 if (copy_from_user(dstbuf, buf, size)) 2424 - return 0; 2424 + return -EFAULT; 2425 2425 2426 2426 if (dent == phba->debug_InjErrLBA) { 2427 2427 if ((dstbuf[0] == 'o') && (dstbuf[1] == 'f') && ··· 2430 2430 } 2431 2431 2432 2432 if ((tmp == 0) && (kstrtoull(dstbuf, 0, &tmp))) 2433 - return 0; 2433 + return -EINVAL; 2434 2434 2435 2435 if (dent == phba->debug_writeGuard) 2436 2436 phba->lpfc_injerr_wgrd_cnt = (uint32_t)tmp;
+1 -1
drivers/scsi/mpt3sas/mpt3sas_scsih.c
··· 413 413 * And add this object to port_table_list. 414 414 */ 415 415 if (!ioc->multipath_on_hba) { 416 - port = kzalloc(sizeof(struct hba_port), GFP_KERNEL); 416 + port = kzalloc(sizeof(struct hba_port), GFP_ATOMIC); 417 417 if (!port) 418 418 return NULL; 419 419
+1 -1
drivers/scsi/myrs.c
··· 2273 2273 if (cs->mmio_base) { 2274 2274 cs->disable_intr(cs); 2275 2275 iounmap(cs->mmio_base); 2276 + cs->mmio_base = NULL; 2276 2277 } 2277 2278 if (cs->irq) 2278 2279 free_irq(cs->irq, cs); 2279 2280 if (cs->io_addr) 2280 2281 release_region(cs->io_addr, 0x80); 2281 - iounmap(cs->mmio_base); 2282 2282 pci_set_drvdata(pdev, NULL); 2283 2283 pci_disable_device(pdev); 2284 2284 scsi_host_put(cs->host);
+1 -1
drivers/scsi/qla2xxx/qla_target.h
··· 116 116 (min(1270, ((ql) > 0) ? (QLA_TGT_DATASEGS_PER_CMD_24XX + \ 117 117 QLA_TGT_DATASEGS_PER_CONT_24XX*((ql) - 1)) : 0)) 118 118 #endif 119 - #endif 120 119 121 120 #define GET_TARGET_ID(ha, iocb) ((HAS_EXTENDED_IDS(ha)) \ 122 121 ? le16_to_cpu((iocb)->u.isp2x.target.extended) \ ··· 243 244 #ifndef CTIO_RET_TYPE 244 245 #define CTIO_RET_TYPE 0x17 /* CTIO return entry */ 245 246 #define ATIO_TYPE7 0x06 /* Accept target I/O entry for 24xx */ 247 + #endif 246 248 247 249 struct fcp_hdr { 248 250 uint8_t r_ctl;
+11 -8
drivers/scsi/sd_zbc.c
··· 280 280 static void sd_zbc_update_wp_offset_workfn(struct work_struct *work) 281 281 { 282 282 struct scsi_disk *sdkp; 283 + unsigned long flags; 283 284 unsigned int zno; 284 285 int ret; 285 286 286 287 sdkp = container_of(work, struct scsi_disk, zone_wp_offset_work); 287 288 288 - spin_lock_bh(&sdkp->zones_wp_offset_lock); 289 + spin_lock_irqsave(&sdkp->zones_wp_offset_lock, flags); 289 290 for (zno = 0; zno < sdkp->nr_zones; zno++) { 290 291 if (sdkp->zones_wp_offset[zno] != SD_ZBC_UPDATING_WP_OFST) 291 292 continue; 292 293 293 - spin_unlock_bh(&sdkp->zones_wp_offset_lock); 294 + spin_unlock_irqrestore(&sdkp->zones_wp_offset_lock, flags); 294 295 ret = sd_zbc_do_report_zones(sdkp, sdkp->zone_wp_update_buf, 295 296 SD_BUF_SIZE, 296 297 zno * sdkp->zone_blocks, true); 297 - spin_lock_bh(&sdkp->zones_wp_offset_lock); 298 + spin_lock_irqsave(&sdkp->zones_wp_offset_lock, flags); 298 299 if (!ret) 299 300 sd_zbc_parse_report(sdkp, sdkp->zone_wp_update_buf + 64, 300 301 zno, sd_zbc_update_wp_offset_cb, 301 302 sdkp); 302 303 } 303 - spin_unlock_bh(&sdkp->zones_wp_offset_lock); 304 + spin_unlock_irqrestore(&sdkp->zones_wp_offset_lock, flags); 304 305 305 306 scsi_device_put(sdkp->device); 306 307 } ··· 325 324 struct request *rq = cmd->request; 326 325 struct scsi_disk *sdkp = scsi_disk(rq->rq_disk); 327 326 unsigned int wp_offset, zno = blk_rq_zone_no(rq); 327 + unsigned long flags; 328 328 blk_status_t ret; 329 329 330 330 ret = sd_zbc_cmnd_checks(cmd); ··· 339 337 if (!blk_req_zone_write_trylock(rq)) 340 338 return BLK_STS_ZONE_RESOURCE; 341 339 342 - spin_lock_bh(&sdkp->zones_wp_offset_lock); 340 + spin_lock_irqsave(&sdkp->zones_wp_offset_lock, flags); 343 341 wp_offset = sdkp->zones_wp_offset[zno]; 344 342 switch (wp_offset) { 345 343 case SD_ZBC_INVALID_WP_OFST: ··· 368 366 369 367 *lba += wp_offset; 370 368 } 371 - spin_unlock_bh(&sdkp->zones_wp_offset_lock); 369 + spin_unlock_irqrestore(&sdkp->zones_wp_offset_lock, flags); 372 370 if (ret) 373 371 blk_req_zone_write_unlock(rq); 374 372 return ret; ··· 447 445 struct scsi_disk *sdkp = scsi_disk(rq->rq_disk); 448 446 unsigned int zno = blk_rq_zone_no(rq); 449 447 enum req_opf op = req_op(rq); 448 + unsigned long flags; 450 449 451 450 /* 452 451 * If we got an error for a command that needs updating the write ··· 455 452 * invalid to force an update from disk the next time a zone append 456 453 * command is issued. 457 454 */ 458 - spin_lock_bh(&sdkp->zones_wp_offset_lock); 455 + spin_lock_irqsave(&sdkp->zones_wp_offset_lock, flags); 459 456 460 457 if (result && op != REQ_OP_ZONE_RESET_ALL) { 461 458 if (op == REQ_OP_ZONE_APPEND) { ··· 499 496 } 500 497 501 498 unlock_wp_offset: 502 - spin_unlock_bh(&sdkp->zones_wp_offset_lock); 499 + spin_unlock_irqrestore(&sdkp->zones_wp_offset_lock, flags); 503 500 504 501 return good_bytes; 505 502 }
+1 -1
drivers/scsi/st.c
··· 1269 1269 spin_lock(&st_use_lock); 1270 1270 if (STp->in_use) { 1271 1271 spin_unlock(&st_use_lock); 1272 - scsi_tape_put(STp); 1273 1272 DEBC_printk(STp, "Device already in use.\n"); 1273 + scsi_tape_put(STp); 1274 1274 return (-EBUSY); 1275 1275 } 1276 1276
+1 -1
drivers/scsi/ufs/ufs-mediatek.c
··· 911 911 if (!hba->vreg_info.vccq2 || !hba->vreg_info.vcc) 912 912 return; 913 913 914 - if (lpm & !hba->vreg_info.vcc->enabled) 914 + if (lpm && !hba->vreg_info.vcc->enabled) 915 915 regulator_set_mode(hba->vreg_info.vccq2->reg, 916 916 REGULATOR_MODE_IDLE); 917 917 else if (!lpm)