dpdk-fm10k/kernel
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
..
freebsd contigmem: cleanup properly when load fails 2020-03-19 15:42:00 +01:00
linux kni: fix build with Linux 5.6 2020-02-13 18:27:41 +01:00
Makefile build/freebsd: rename macro BSDPAPP to FREEBSD 2019-03-12 23:01:14 +01:00
meson.build build: increase readability via shortcut variables 2019-04-17 18:09:52 +02:00