From: Hillf Danton <hdanton@sina.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Peter Xu <peterx@redhat.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
syzbot+3be1a33f04dc782e9fd5@syzkaller.appspotmail.com
Subject: Re: [PATCH] mm/gup: Let __get_user_pages_locked() return -EINTR for fatal signal
Date: Thu, 9 Apr 2020 10:27:45 +0800 [thread overview]
Message-ID: <20200409022745.8400-1-hdanton@sina.com> (raw)
In-Reply-To: <20200408155924.107722-1-peterx@redhat.com>
Hi Peter
On Wed, 8 Apr 2020 19:27:23 +0200 Peter Zijlstra wrote:
>
> > --- 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;
>
> Why -EINTR here and -ERESTARTSYS at the other site?
EINTR was selected because it goes in the direction of
mutex_lock_killable() and down_read_killable() as well.
Be open to s/ERESTARTSYS/EINTR/ in gup if it makes a
sense to you.
Thanks
Hillf
prev parent reply other threads:[~2020-04-09 2:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-08 15:59 Peter Xu
2020-04-08 16:20 ` Linus Torvalds
2020-04-08 17:13 ` Michal Hocko
2020-04-08 17:27 ` Peter Zijlstra
2020-04-08 17:32 ` Linus Torvalds
2020-04-09 2:27 ` Hillf Danton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200409022745.8400-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterx@redhat.com \
--cc=peterz@infradead.org \
--cc=syzbot+3be1a33f04dc782e9fd5@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox