numam-dpdk/kernel/freebsd
Jim Harris 3df9513374 contigmem: cleanup properly when load fails
If contigmem is not able to allocate all of the
requested buffers, it frees whatever buffers were
able to be allocated up until that point.

But the pointers are not set to NULL in that case.
After the load fails, the FreeBSD kernel will
immediately call the contigmem unload handler, which
tries to free the buffers again since the pointers
were not set to NULL.

It's not clear that we should just rely on the unload
handler getting called after load failure. So let's
keep the existing cleanup code in the load handler,
but explicitly set the pointers to NULL after freeing
them.

Fixes: 5f51eca224 ("contigmem: free allocated memory on error")
Cc: stable@dpdk.org

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2020-03-19 15:42:00 +01:00
..
contigmem contigmem: cleanup properly when load fails 2020-03-19 15:42:00 +01:00
nic_uio
BSDmakefile.meson
Makefile
meson.build kernel/freebsd: always use clang for kmod compilation 2019-11-20 10:17:33 +01:00