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. > Let's change it to -EFAULT. Thanks :-) -- Mit freundlichen Grüßen / Best Regards Christian Borntraeger Linux Software Engineer zSeries Linux & Virtualization - 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