Skip to content

Commit

Permalink
binder: Fix log spam caused by interrupted waits
Browse files Browse the repository at this point in the history
Being interrupted by a signal during binder ioctls is not unusual.
Commit 218225c05beaf02320f05a9b3b7041e27a0684f7 changed the interrupted
ioctl return code from ERESTARTSYS to EINTR, but the error logging check
was never updated:

[  352.090265] binder: 6534:6552 ioctl c0306201 7a0f9fea10 returned -4
[  352.090393] binder: 6534:7670 ioctl c0306201 7a6489da10 returned -4
[  352.090432] binder: 6534:9501 ioctl c0306201 7a61377a10 returned -4

Update the return code to fix the log spam.

Signed-off-by: Danny Lin <danny@kdrag0n.dev>
  • Loading branch information
kdrag0n authored and humanglitch191 committed Aug 30, 2021
1 parent b8a8dda commit 7f8daf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/android/binder.c
Original file line number Diff line number Diff line change
Expand Up @@ -5292,7 +5292,7 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
if (thread)
thread->looper_need_return = false;
wait_event_interruptible(binder_user_error_wait, binder_stop_on_user_error < 2);
if (ret && ret != -ERESTARTSYS)
if (ret && ret != -EINTR)
pr_info("%d:%d ioctl %x %lx returned %d\n", proc->pid, current->pid, cmd, arg, ret);
err_unlocked:
trace_binder_ioctl_done(ret);
Expand Down

0 comments on commit 7f8daf4

Please sign in to comment.