oce(4): Account and trace mbufs before handing to hw
authorConrad Meyer <cem@FreeBSD.org>
Sat, 20 Jun 2020 17:22:46 +0000 (17:22 +0000)
committerConrad Meyer <cem@FreeBSD.org>
Sat, 20 Jun 2020 17:22:46 +0000 (17:22 +0000)
commitb75a772875a4276c34de52a96641d45ad0c10031
tree16f41a215f5e49142c6756982056672d8ae91fe1
parent75dc9c41abca99f9e1b6b190602b2fb578f79bc3
oce(4): Account and trace mbufs before handing to hw

Once tx mbufs have been handed to hardware, nothing serializes the tx
path against completion and potential use-after-free of the outbound
mbuf.  Perform accounting and BPF tap before queueing to hardware to
avoid this race.

Submitted by: Steve Wirtz <steve_wirtz AT dell.com>
Reviewed by: markj, rstone
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D25364
sys/dev/oce/oce_if.c