iflib: Add null check to iflib_stop()
Ever since gtaskqueue_drain() was added to iflib_stop(), a kernel panic occurs when the ice(4) driver is in recovery mode. Queues are not initialized in this mode, so gt_taskqueue is not initialized, and gtaskqueue_drain() will panic. Fix this by only doing a drain if an RX queue's gt_taskqueue is initialized. Signed-off-by: Eric Joyner <erj@FreeBSD.org> Reviewed by: erj@ MFC after: 1 week Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D37892
This commit is contained in:
parent
2508da22cd
commit
9147969bc2
@ -2644,8 +2644,9 @@ iflib_stop(if_ctx_t ctx)
|
|||||||
bzero((void *)di->idi_vaddr, di->idi_size);
|
bzero((void *)di->idi_vaddr, di->idi_size);
|
||||||
}
|
}
|
||||||
for (i = 0; i < scctx->isc_nrxqsets; i++, rxq++) {
|
for (i = 0; i < scctx->isc_nrxqsets; i++, rxq++) {
|
||||||
gtaskqueue_drain(rxq->ifr_task.gt_taskqueue,
|
if (rxq->ifr_task.gt_taskqueue != NULL)
|
||||||
&rxq->ifr_task.gt_task);
|
gtaskqueue_drain(rxq->ifr_task.gt_taskqueue,
|
||||||
|
&rxq->ifr_task.gt_task);
|
||||||
|
|
||||||
rxq->ifr_cq_cidx = 0;
|
rxq->ifr_cq_cidx = 0;
|
||||||
for (j = 0, di = rxq->ifr_ifdi; j < sctx->isc_nrxqs; j++, di++)
|
for (j = 0, di = rxq->ifr_ifdi; j < sctx->isc_nrxqs; j++, di++)
|
||||||
|
Loading…
Reference in New Issue
Block a user