]> git.baikalelectronics.ru Git - kernel.git/commit
mm, gup: return EINTR when gup is interrupted by fatal signals
authorMichal Hocko <mhocko@suse.com>
Tue, 21 Apr 2020 01:13:55 +0000 (18:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 21 Apr 2020 18:11:55 +0000 (11:11 -0700)
commit1ce4f1959daae2c69c08197ff2aa3cc1997ce248
tree392acc0e38b97aa94f6e35069474c5e280136cc3
parent6cec9527acdf9a3bf40f6df6b2efd3111d8a86c7
mm, gup: return EINTR when gup is interrupted by fatal signals

EINTR is the usual error code which other killable interfaces return.
This is the case for the other fatal_signal_pending break out from the
same function.  Make the code consistent.

ERESTARTSYS is also quite confusing because the signal is fatal and so
no restart will happen before returning to the userspace.

Signed-off-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Xu <peterx@redhat.com>
Cc: Hillf Danton <hdanton@sina.com>
Link: http://lkml.kernel.org/r/20200409071133.31734-1-mhocko@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/gup.c