eal/memory: fix unused SIGBUS handler
authorOlivier Matz <olivier.matz@6wind.com>
Fri, 24 Sep 2021 12:33:26 +0000 (14:33 +0200)
committerOlivier Matz <olivier.matz@6wind.com>
Fri, 29 Oct 2021 09:51:05 +0000 (11:51 +0200)
commit1c9ce175d6e781dd1e1dcb900b72495b92283c36
treeb6cf10fcb785f0f4a95ed57b59faaa587bf2d4bc
parentd50c3395cc691e7b524c138b8cf26deb2da49437
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