Skip to content

Commit 5ded587

Browse files
committed
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley: "Two fairly small fixes: the qla one is a panic inducing use after free and the entropy fix may seem minor but it has had huge userspace impact thanks to an unrelated change in openssl that causes sshd to refuse logins until it has enough entropy for the session keys, which causes tens of minutes delay before the affected systems allow logins after reboot" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: qla2xxx: Fix panic from use after free in qla2x00_async_tm_cmd scsi: sd: fix entropy gathering for most rotational disks
2 parents 24f0a48 + 388a499 commit 5ded587

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

drivers/scsi/qla2xxx/qla_init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1785,13 +1785,13 @@ qla2x00_async_tm_cmd(fc_port_t *fcport, uint32_t flags, uint32_t lun,
17851785

17861786
/* Issue Marker IOCB */
17871787
qla2x00_marker(vha, vha->hw->req_q_map[0],
1788-
vha->hw->rsp_q_map[0], sp->fcport->loop_id, lun,
1788+
vha->hw->rsp_q_map[0], fcport->loop_id, lun,
17891789
flags == TCF_LUN_RESET ? MK_SYNC_ID_LUN : MK_SYNC_ID);
17901790
}
17911791

17921792
done_free_sp:
17931793
sp->free(sp);
1794-
sp->fcport->flags &= ~FCF_ASYNC_SENT;
1794+
fcport->flags &= ~FCF_ASYNC_SENT;
17951795
done:
17961796
return rval;
17971797
}

drivers/scsi/sd.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2951,9 +2951,6 @@ static void sd_read_block_characteristics(struct scsi_disk *sdkp)
29512951
if (rot == 1) {
29522952
blk_queue_flag_set(QUEUE_FLAG_NONROT, q);
29532953
blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, q);
2954-
} else {
2955-
blk_queue_flag_clear(QUEUE_FLAG_NONROT, q);
2956-
blk_queue_flag_set(QUEUE_FLAG_ADD_RANDOM, q);
29572954
}
29582955

29592956
if (sdkp->device->type == TYPE_ZBC) {
@@ -3090,6 +3087,15 @@ static int sd_revalidate_disk(struct gendisk *disk)
30903087
if (sdkp->media_present) {
30913088
sd_read_capacity(sdkp, buffer);
30923089

3090+
/*
3091+
* set the default to rotational. All non-rotational devices
3092+
* support the block characteristics VPD page, which will
3093+
* cause this to be updated correctly and any device which
3094+
* doesn't support it should be treated as rotational.
3095+
*/
3096+
blk_queue_flag_clear(QUEUE_FLAG_NONROT, q);
3097+
blk_queue_flag_set(QUEUE_FLAG_ADD_RANDOM, q);
3098+
30933099
if (scsi_device_supports_vpd(sdp)) {
30943100
sd_read_block_provisioning(sdkp);
30953101
sd_read_block_limits(sdkp);

0 commit comments

Comments
 (0)