Commit d180870d authored by Michal Hocko's avatar Michal Hocko Committed by Linus Torvalds

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: default avatarMichal Hocko <>
Signed-off-by: default avatarAndrew Morton <>
Acked-by: default avatarLinus Torvalds <>
Cc: Peter Xu <>
Cc: Hillf Danton <>
Link: default avatarLinus Torvalds <>
parent 3c1d7e6c
......@@ -1088,7 +1088,7 @@ static long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
* potentially allocating memory.
if (fatal_signal_pending(current)) {
ret = -EINTR;
goto out;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment