Skip to content

Commit

Permalink
14858 use after free in pvscsi
Browse files Browse the repository at this point in the history
Reviewed by: Jerry Jelinek <gjelinek@gmail.com>
Reviewed by: Joyce McIntosh <jmcintosh@racktopsystems.com>
Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
  • Loading branch information
gdamore committed Jul 27, 2022
1 parent f3ba9b4 commit 7a73cc8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions usr/src/uts/common/io/scsi/adapters/pvscsi/pvscsi.c
Expand Up @@ -1141,6 +1141,7 @@ pvscsi_start(struct scsi_address *ap, struct scsi_pkt *pkt)
pvscsi_device_t *pd;
pvscsi_softc_t *pvs;
int rc;
boolean_t poll;

/* make sure the packet is sane */
if ((pkt->pkt_numcookies > PVSCSI_MAX_SG_SIZE) ||
Expand All @@ -1154,7 +1155,7 @@ pvscsi_start(struct scsi_address *ap, struct scsi_pkt *pkt)

ASSERT(cmd->pkt == pkt);

cmd->poll = ((pkt->pkt_flags & FLAG_NOINTR) != 0);
poll = cmd->poll = ((pkt->pkt_flags & FLAG_NOINTR) != 0);

if (pkt->pkt_flags & (FLAG_HTAG|FLAG_HEAD)) {
cmd->tag = MSG_HEAD_QTAG;
Expand Down Expand Up @@ -1198,7 +1199,7 @@ pvscsi_start(struct scsi_address *ap, struct scsi_pkt *pkt)

rc = pvscsi_transport_command(pvs, cmd);

if (cmd->poll && rc == TRAN_ACCEPT) {
if (poll && rc == TRAN_ACCEPT) {
pvscsi_poll_cmd(pvs, cmd);
pvscsi_set_status(pvs, cmd);
}
Expand Down

0 comments on commit 7a73cc8

Please sign in to comment.