binder: use EINTR for interrupted wait for work
authorMarco Ballesio <balejs@google.com>
Tue, 16 Mar 2021 01:16:29 +0000 (18:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Mar 2021 07:26:31 +0000 (08:26 +0100)
commit95c16f9d9cf9db090ae16179f1f721284a6f3aef
treecbdd51a6ee5a39bd2f2474414c7dcc4b3a975446
parent432ff1e91694e4c55a5bf6bc0574f4c254970232
binder: use EINTR for interrupted wait for work

when interrupted by a signal, binder_wait_for_work currently returns
-ERESTARTSYS. This error code isn't propagated to user space, but a way
to handle interruption due to signals must be provided to code using
this API.

Replace this instance of -ERESTARTSYS with -EINTR, which is propagated
to user space.

binder_wait_for_work

Signed-off-by: Marco Ballesio <balejs@google.com>
Signed-off-by: Li Li <dualli@google.com>
Test: built, booted, interrupted a worker thread within
Acked-by: Todd Kjos <tkjos@google.com>
Link: https://lore.kernel.org/r/20210316011630.1121213-3-dualli@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/android/binder.c