mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
SCSI fixes on 20251122
One target driver fix and one scsi-generic one. The latter is 10 lines because the problem lock has to be dropped and re-taken around the call causing the sleep in atomic. Signed-off-by: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> -----BEGIN PGP SIGNATURE----- iLgEABMIAGAWIQTnYEDbdso9F2cI+arnQslM7pishQUCaSHVghsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMSwyLDImHGphbWVzLmJvdHRvbWxleUBoYW5zZW5wYXJ0bmVy c2hpcC5jb20ACgkQ50LJTO6YrIW+xQEAx4Sfjb+NTZ4qcDX2wjAosFUnuu5RUnn6 YG1OSrzHHP4A/RQQIxerooZPSD67LxIFVsxCV3yu6S88+n4P3emAec3V =qUHX -----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: "One target driver fix and one scsi-generic one. The latter is 10 lines because the problem lock has to be dropped and re-taken around the call causing the sleep in atomic" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: sg: Do not sleep in atomic context scsi: target: tcm_loop: Fix segfault in tcm_loop_tpg_address_show()
This commit is contained in:
commit
7e29f07760
|
|
@ -2208,9 +2208,17 @@ sg_remove_sfp_usercontext(struct work_struct *work)
|
|||
write_lock_irqsave(&sfp->rq_list_lock, iflags);
|
||||
while (!list_empty(&sfp->rq_list)) {
|
||||
srp = list_first_entry(&sfp->rq_list, Sg_request, entry);
|
||||
sg_finish_rem_req(srp);
|
||||
list_del(&srp->entry);
|
||||
write_unlock_irqrestore(&sfp->rq_list_lock, iflags);
|
||||
|
||||
sg_finish_rem_req(srp);
|
||||
/*
|
||||
* sg_rq_end_io() uses srp->parentfp. Hence, only clear
|
||||
* srp->parentfp after blk_mq_free_request() has been called.
|
||||
*/
|
||||
srp->parentfp = NULL;
|
||||
|
||||
write_lock_irqsave(&sfp->rq_list_lock, iflags);
|
||||
}
|
||||
write_unlock_irqrestore(&sfp->rq_list_lock, iflags);
|
||||
|
||||
|
|
|
|||
|
|
@ -894,6 +894,9 @@ static ssize_t tcm_loop_tpg_address_show(struct config_item *item,
|
|||
struct tcm_loop_tpg, tl_se_tpg);
|
||||
struct tcm_loop_hba *tl_hba = tl_tpg->tl_hba;
|
||||
|
||||
if (!tl_hba->sh)
|
||||
return -ENODEV;
|
||||
|
||||
return snprintf(page, PAGE_SIZE, "%d:0:%d\n",
|
||||
tl_hba->sh->host_no, tl_tpg->tl_tpgt);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user