Fix an iflib driver unload panic introduced in r343085
The new loop to sync and unload descriptors was indexed by "i", rather than "j". The panic was caused by "i" being advanced rather than "j", and eventually becoming out of bounds. Reviewed by: kib MFC after: 3 days Sponsored by: Netflix
This commit is contained in:
parent
ade4db4d04
commit
77102fd6a2
@ -2197,17 +2197,17 @@ iflib_rx_sds_free(iflib_rxq_t rxq)
|
||||
fl = &rxq->ifr_fl[i];
|
||||
if (fl->ifl_desc_tag != NULL) {
|
||||
if (fl->ifl_sds.ifsd_map != NULL) {
|
||||
for (j = 0; j < fl->ifl_size; i++) {
|
||||
if (fl->ifl_sds.ifsd_map[i] ==
|
||||
for (j = 0; j < fl->ifl_size; j++) {
|
||||
if (fl->ifl_sds.ifsd_map[j] ==
|
||||
NULL)
|
||||
continue;
|
||||
continue;
|
||||
bus_dmamap_sync(
|
||||
fl->ifl_desc_tag,
|
||||
fl->ifl_sds.ifsd_map[i],
|
||||
fl->ifl_sds.ifsd_map[j],
|
||||
BUS_DMASYNC_POSTREAD);
|
||||
bus_dmamap_unload(
|
||||
fl->ifl_desc_tag,
|
||||
fl->ifl_sds.ifsd_map[i]);
|
||||
fl->ifl_sds.ifsd_map[j]);
|
||||
}
|
||||
}
|
||||
bus_dma_tag_destroy(fl->ifl_desc_tag);
|
||||
|
Loading…
Reference in New Issue
Block a user