mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-01 14:14:56 +00:00
ahci/siis/mvs: Fix panics after 3394d4239b
.
Full CCB header overwrites made frees go into wrong zones, causing kernel panics. Instead of copying full header use xpt_setup_ccb(), since the only field I see used from all the header is target_id. PR: 262263
This commit is contained in:
parent
d746ab215c
commit
25375b1415
|
@ -2178,7 +2178,8 @@ ahci_issue_recovery(struct ahci_channel *ch)
|
||||||
ahci_reset(ch);
|
ahci_reset(ch);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ccb->ccb_h = ch->hold[i]->ccb_h; /* Reuse old header. */
|
xpt_setup_ccb(&ccb->ccb_h, ch->hold[i]->ccb_h.path,
|
||||||
|
ch->hold[i]->ccb_h.pinfo.priority);
|
||||||
if (ccb->ccb_h.func_code == XPT_ATA_IO) {
|
if (ccb->ccb_h.func_code == XPT_ATA_IO) {
|
||||||
/* READ LOG */
|
/* READ LOG */
|
||||||
ccb->ccb_h.recovery_type = RECOVERY_READ_LOG;
|
ccb->ccb_h.recovery_type = RECOVERY_READ_LOG;
|
||||||
|
|
|
@ -1801,7 +1801,8 @@ mvs_issue_recovery(device_t dev)
|
||||||
mvs_reset(dev);
|
mvs_reset(dev);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ccb->ccb_h = ch->hold[i]->ccb_h; /* Reuse old header. */
|
xpt_setup_ccb(&ccb->ccb_h, ch->hold[i]->ccb_h.path,
|
||||||
|
ch->hold[i]->ccb_h.pinfo.priority);
|
||||||
if (ccb->ccb_h.func_code == XPT_ATA_IO) {
|
if (ccb->ccb_h.func_code == XPT_ATA_IO) {
|
||||||
/* READ LOG */
|
/* READ LOG */
|
||||||
ccb->ccb_h.recovery_type = RECOVERY_READ_LOG;
|
ccb->ccb_h.recovery_type = RECOVERY_READ_LOG;
|
||||||
|
|
|
@ -1396,7 +1396,8 @@ siis_issue_recovery(device_t dev)
|
||||||
siis_reset(dev);
|
siis_reset(dev);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ccb->ccb_h = ch->hold[i]->ccb_h; /* Reuse old header. */
|
xpt_setup_ccb(&ccb->ccb_h, ch->hold[i]->ccb_h.path,
|
||||||
|
ch->hold[i]->ccb_h.pinfo.priority);
|
||||||
if (ccb->ccb_h.func_code == XPT_ATA_IO) {
|
if (ccb->ccb_h.func_code == XPT_ATA_IO) {
|
||||||
/* READ LOG */
|
/* READ LOG */
|
||||||
ccb->ccb_h.recovery_type = RECOVERY_READ_LOG;
|
ccb->ccb_h.recovery_type = RECOVERY_READ_LOG;
|
||||||
|
|
Loading…
Reference in a new issue