eal/memory: fix unused SIGBUS handler kvargs-20210924
authorOlivier Matz <olivier.matz@6wind.com>
Fri, 24 Sep 2021 12:33:26 +0000 (14:33 +0200)
committerOlivier Matz <olivier.matz@6wind.com>
Fri, 24 Sep 2021 12:59:39 +0000 (14:59 +0200)
commitfcb5717ccfaa19a4f7a74f7bda6c1df6b6eb9ef4
treea76f613f8bbc9075b0334b8c8fdbf53d9391ecb0
parent2048d64158631593bac7af4fbfab386920b95853
eal/memory: fix unused SIGBUS handler

Since its introduction in 2018, the SIGBUS handler was never registered,
and all related functions were unused.

A SIGBUS can be received by the application when accessing to hugepages
even if mmap() was successful, This happens especially when running
inside containers when there is not enough hugepages. In this case, we
need to recover. A similar scheme can be found in eal_memory.c.

Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
lib/eal/linux/eal_memalloc.c