On Tue, Jul 18, 2006 at 01:16:18PM +0200, Christian Borntraeger ([EMAIL
PROTECTED]) wrote:
> Hello Evgeniy,
>
> > +asmlinkage long sys_netchannel_control(void __user *arg)
> [...]
> > + if (copy_from_user(&ctl, arg, sizeof(struct unetchannel_control)))
> > + return -ERESTARTSYS;
> ^^^^^^^^^^^
> [...]
> > + if (copy_to_user(arg, &ctl, sizeof(struct unetchannel_control)))
> > + return -ERESTARTSYS;
> ^^^^^^^^^^^
>
> 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.
Let's change it to -EFAULT.
> --
> 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