mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 14:26:03 -04:00
Fix kernel panic in mps(4) driver.
Approved by: so Security: FreeBSD-EN-20:15.mps
This commit is contained in:
parent
88f3ac6532
commit
00cf6fb724
1 changed files with 5 additions and 3 deletions
|
|
@ -1045,10 +1045,12 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data)
|
|||
if (((MPI2_SCSI_IO_REPLY *)rpl)->SCSIState &
|
||||
MPI2_SCSI_STATE_AUTOSENSE_VALID) {
|
||||
sense_len =
|
||||
MIN((le32toh(((MPI2_SCSI_IO_REPLY *)rpl)->SenseCount)),
|
||||
sizeof(struct scsi_sense_data));
|
||||
MIN((le32toh(((MPI2_SCSI_IO_REPLY *)rpl)->
|
||||
SenseCount)), sizeof(struct
|
||||
scsi_sense_data));
|
||||
mps_unlock(sc);
|
||||
copyout(cm->cm_sense, cm->cm_req + 64, sense_len);
|
||||
copyout(cm->cm_sense, (PTRIN(data->PtrReply +
|
||||
sizeof(MPI2_SCSI_IO_REPLY))), sense_len);
|
||||
mps_lock(sc);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue