Re: [PATCH] mm/gup: Let __get_user_pages_locked() return -EINTR for fatal signal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux