On Tue, Jul 18, 2006 at 02:36:57PM +0200, Christian Borntraeger ([EMAIL
PROTECTED]) wrote:
> On Tuesday 18 July 2006 13:51, Evgeniy Polyakov wrote:
> > > I think this should be -EFAULT instead of -ERESTARTSYS, right?
> >
> > I have no strong feeling on what must be returned in that case.
> > As far as I see, copy*user can fail due to absence of the next
> > destination page, so -ERESTARTSYS makes sence, but if failure happens due
> > to process size limitation, -EFAULT is correct.
>
> If I am not completely mistaken ERESTARTSYS is wrong.
> include/linux/errno.h says userspace should never see ERESTARTSYS, therefore
> we should only return it if we were interrupted by a signal as do_signal
> takes care of ERESTARTSYS. Furthermore, copy*user transparently faults in
> necessary pages as long as the address is valid in the user context.
Actually userspace will not see ERESTARTSYS, when it is returned from
syscall.
> > Let's change it to -EFAULT.
>
> Thanks :-)
No problem. I've commited this change already.
> --
> Mit freundlichen Gr????en / Best Regards
>
> Christian Borntraeger
> Linux Software Engineer zSeries Linux & Virtualization
--
Evgeniy Polyakov
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html