Call drbr_advance() before leaving TX routine
If drbr_advance() is not called before doing cleanup and packet is already enqueued for sending (tx_info is holding pointer to mbuf), then mbuf is cleaned both in drbr_flush() and in cleanup routine, when all mbufs hold by tx_buffer_info are being released. This causes panic, because mbuf is released twice. Submitted by: Michal Krawczyk <mk@semihalf.com> Obtained from: Semihalf Sponsored by: Amazon.com Inc.
This commit is contained in:
parent
93471047c0
commit
b4b2903275
@ -2805,10 +2805,11 @@ ena_start_xmit(struct ena_ring *tx_ring)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
drbr_advance(adapter->ifp, tx_ring->br);
|
||||||
|
|
||||||
if ((adapter->ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
|
if ((adapter->ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
drbr_advance(adapter->ifp, tx_ring->br);
|
|
||||||
acum_pkts++;
|
acum_pkts++;
|
||||||
|
|
||||||
BPF_MTAP(adapter->ifp, mbuf);
|
BPF_MTAP(adapter->ifp, mbuf);
|
||||||
|
Loading…
Reference in New Issue
Block a user