Skip to content

Commit d180870

Browse files
Michal Hockotorvalds
authored andcommitted
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]>
1 parent 3c1d7e6 commit d180870

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/gup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ static long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
10881088
* potentially allocating memory.
10891089
*/
10901090
if (fatal_signal_pending(current)) {
1091-
ret = -ERESTARTSYS;
1091+
ret = -EINTR;
10921092
goto out;
10931093
}
10941094
cond_resched();

0 commit comments

Comments
 (0)