lkml.org 
[lkml]   [2020]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: WARNING in af_alg_make_sg
On Wed 08-04-20 11:12:13, Peter Xu wrote:
> >From 380003a56efc125565143c91ee6cefd7b3eba869 Mon Sep 17 00:00:00 2001
> From: Hillf Danton <hdanton@sina.com>
> Date: Wed, 8 Apr 2020 11:01:25 -0400
> Subject: [PATCH] mm/gup: Let __get_user_pages_locked() return -EINTR for fatal
> signal
>
> __get_user_pages_locked() will return 0 instead of -EINTR after commit
> 4426e945df588 which added extra code to allow gup detect fatal signal
> faster. Restore that behavior.
>
> CC: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Hillf Danton <hdanton@sina.com>
> [peterx: write commit message]

Fixes: 4426e945df58 ("mm/gup: allow VM_FAULT_RETRY for multiple times")
> Signed-off-by: Peter Xu <peterx@redhat.com>

Acked-by: Michal Hocko <mhocko@suse.com>

> ---
> mm/gup.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/mm/gup.c b/mm/gup.c
> index afce0bc47e70..6076df8e04a4 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -1326,8 +1326,11 @@ static __always_inline long __get_user_pages_locked(struct task_struct *tsk,
> * start trying again otherwise it can loop forever.
> */
>
> - if (fatal_signal_pending(current))
> + if (fatal_signal_pending(current)) {
> + if (!pages_done)
> + pages_done = -EINTR;
> break;
> + }
>
> ret = down_read_killable(&mm->mmap_sem);
> if (ret) {
> --
> 2.24.1
>
>
> --
> Peter Xu
>

--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2020-04-08 17:33    [W:4.459 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site