]> git.baikalelectronics.ru Git - uboot.git/commit
sandbox: unblock signal before calling execv()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 2 Sep 2022 00:32:25 +0000 (02:32 +0200)
committerSimon Glass <sjg@chromium.org>
Sun, 25 Sep 2022 14:30:05 +0000 (08:30 -0600)
commit0f4c1571c2f1c7acccf4d7b4db1d288ae39beb04
tree74de4071e04a8f350ca520f0345273156a5eacb9
parent7b1ab59afc20813cf43500815fb7873acd19f2ea
sandbox: unblock signal before calling execv()

The following faulty behavior was observed. The sandbox configured with
CONFIG_SANDBOX_CRASH_RESET=y was invoked with

    ./u-boot -T -S

After executing `exception undefined' the sandbox reboots.
When executing `exception undefined' the sandbox exits with SIGSEGV.

The expected behavior is that the sandbox should reboot again.

If we are relaunching the sandbox in a signal handler, we have to unblock
the respective signal before calling execv(). See signal(7) man-page.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/sandbox/cpu/os.c