]> Git Repo - linux.git/commit - fs/signalfd.c
fs/signalfd.c: fix inconsistent return codes for signalfd4
authorHelge Deller <[email protected]>
Wed, 12 Aug 2020 01:36:04 +0000 (18:36 -0700)
committerLinus Torvalds <[email protected]>
Wed, 12 Aug 2020 17:58:01 +0000 (10:58 -0700)
commita089e3fd5a82aea20f3d9ec4caa5f4c65cc2cfcc
tree1f7ef4eccc8f472d610f70e42df59f281bdcdf8b
parenta090a5a7d73f79a9ae2dcc6e60d89bfc6864a65a
fs/signalfd.c: fix inconsistent return codes for signalfd4

The kernel signalfd4() syscall returns different error codes when called
either in compat or native mode.  This behaviour makes correct emulation
in qemu and testing programs like LTP more complicated.

Fix the code to always return -in both modes- EFAULT for unaccessible user
memory, and EINVAL when called with an invalid signal mask.

Signed-off-by: Helge Deller <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Laurent Vivier <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
fs/signalfd.c
This page took 0.053952 seconds and 4 git commands to generate.