SCSI: Reset flags on the correct request in submit_autosense.

The passed request is the one triggering the auto-sense, not
the auto-sense itself.

Resetting the "buffered" flag on the wrong request meant that
if a buffer had been used for the triggering request, it would
be leaked, and subsequently we would get KDLs when trying to
unlock memory that wasn't actually locked at all.

Fixes #19218 and related tickets.
This commit is contained in:
Augustin Cavalier 2024-11-04 15:07:56 -05:00
parent 7190c0f117
commit 53728117bc

View File

@ -152,9 +152,12 @@ submit_autosense(scsi_ccb *request)
// no DMA buffer (we made sure that the data buffer fulfills all
// limitations)
request->buffered = false;
device->auto_sense_request->buffered = false;
// don't let any request bypass us
request->ordered = true;
device->auto_sense_request->ordered = true;
// request is not emulated
device->auto_sense_request->emulated = false;
// initial SIM state for this request
request->sim_state = 0;