mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
![]() netmap_generic keeps a pool of mbufs for handling transfers, these mbufs have an external buffer attached to them. If some cases other parts of the network stack can chain these mbufs, when this happens the normal pool destructor function can end up free'ing the pool mbufs twice: - A first time if a pool mbuf has been chained with another mbuf when its chain is freed - A second time when its entry in the pool is freed Additionally, if other parts of the stack demote a pool mbuf its interface reference will be cleared. In this case we deference a NULL pointer when trying to free the mbuf through the destructor. Store a reference to the adapter in ext_arg1 with the destructor callback so we can find the correct adapter when free'ing a pool mbuf. This change enables using netmap with epair interfaces. Reviewed By: vmaffione MFC after: 1 week Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44371 |
||
---|---|---|
.. | ||
if_ptnet.c | ||
if_re_netmap.h | ||
if_vtnet_netmap.h | ||
netmap.c | ||
netmap_bdg.c | ||
netmap_bdg.h | ||
netmap_freebsd.c | ||
netmap_generic.c | ||
netmap_kern.h | ||
netmap_kloop.c | ||
netmap_legacy.c | ||
netmap_mbq.c | ||
netmap_mbq.h | ||
netmap_mem2.c | ||
netmap_mem2.h | ||
netmap_monitor.c | ||
netmap_null.c | ||
netmap_offloadings.c | ||
netmap_pipe.c | ||
netmap_vale.c |