opnsense-src/sys/dev/netmap
Mark Johnston d2b3efaf24 netmap: Fix error handling in nm_os_extmem_create()
We bump the object reference count prior to mapping it into the kernel
map, at which point the vm_map_entry owns the reference.  Then, if
vm_map_wire() fails, vm_map_remove() will release the reference, so we
should avoid decrementing it in the error path.

Reported by:	Ilja van Sprundel <ivansprundel@ioactive.com>
Reviewed by:	vmaffione
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D53066

(cherry picked from commit dfc1041c08ba32f24b8050b4d635a0bbbfd9b767)
2025-12-17 08:01:57 +01:00
..
if_ptnet.c vtnet, ptnet: include opt_*.h files early 2025-09-08 10:25:23 +02:00
if_re_netmap.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
if_vtnet_netmap.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
netmap.c netmap: Make memory pools NUMA-aware 2024-10-28 16:39:50 +00:00
netmap_bdg.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
netmap_bdg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
netmap_freebsd.c netmap: Fix error handling in nm_os_extmem_create() 2025-12-17 08:01:57 +01:00
netmap_generic.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
netmap_kern.h netmap: Make memory pools NUMA-aware 2024-10-28 16:39:50 +00:00
netmap_kloop.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
netmap_legacy.c sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
netmap_mbq.c sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
netmap_mbq.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
netmap_mem2.c netmap: Make memory pools NUMA-aware 2024-10-28 16:39:50 +00:00
netmap_mem2.h netmap: Make memory pools NUMA-aware 2024-10-28 16:39:50 +00:00
netmap_monitor.c sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
netmap_null.c sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
netmap_offloadings.c sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
netmap_pipe.c sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
netmap_vale.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00