Re: AUDIT of 2.5.15 copy_to/from_user

Alan Cox (alan@lxorguk.ukuu.org.uk)
Mon, 20 May 2002 12:47:42 +0100 (BST)


> Disagree. May not cause problems at the moment, but a function which
> does:
>
> if (!access_ok (VERIFY_WRITE, to, sizeof(siginfo_t)))
> return -EFAULT;
> if (from->si_code < 0)
> return __copy_to_user(to, from, sizeof(siginfo_t));
>
> Is clearly wrong,

Its a function that returns non zero for error. Its clearly right. It just
doesn't conform to Rusty's grand vision.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/