diff options
author | Michal Hocko <[email protected]> | 2020-04-20 18:13:55 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2020-04-21 11:11:55 -0700 |
commit | d180870d83dbb076fabd6d469f2626c071f12255 (patch) | |
tree | 392acc0e38b97aa94f6e35069474c5e280136cc3 | |
parent | 3c1d7e6ccb644d517a12f73a7ff200870926f865 (diff) |
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Acked-by: Linus Torvalds <[email protected]>
Cc: Peter Xu <[email protected]>
Cc: Hillf Danton <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | mm/gup.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1088,7 +1088,7 @@ retry: * potentially allocating memory. */ if (fatal_signal_pending(current)) { - ret = -ERESTARTSYS; + ret = -EINTR; goto out; } cond_resched(); |