[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190515142828.GA18892@redhat.com>
Date: Wed, 15 May 2019 16:28:28 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
Cc: linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: use down_read_killable for locking mmap_sem in
access_remote_vm
> @@ -4348,7 +4348,9 @@ int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
> void *old_buf = buf;
> int write = gup_flags & FOLL_WRITE;
>
> - down_read(&mm->mmap_sem);
> + if (down_read_killable(&mm->mmap_sem))
> + return 0;
> +
I too think that "return 0" looks a bit strange even if correct, to me
"return -EINTR" would look better.
But I won't insist, this is cosmetic.
Acked-by: Oleg Nesterov <oleg@...hat.com>
Powered by blists - more mailing lists