Subject: Re: [PATCH]IPv6:remove duplicate check of optlen when setsockopt with IPV6_PKTINFO option

From: Yang Hongyang <[email-masked]>
Date: Thu, 15 Jan 2009 13:34:03 +0800

David Miller wrote:
> From: Herbert Xu <[email-masked]>
> Date: Wed, 14 Jan 2009 15:48:56 +1100
> 
>> Yang Hongyang <[email-masked]> wrote:
>>> If optval==NULL, what we should return?EINVAL or EFAULT?
>>> If it is EINVAL,then we should check it .otherwise it's the job of 
>>> copy_from_user
>> I think EFAULT is fine.  We return that elsewhere as well.
> 
> Actually, we return EINVAL just a few lines above this code
> block for some other socket option cases when optval==NULL.
> 
> So for consistency I'm applying Yang's original patch to
> net-next-2.6

Dave,there are some of the code elsewhere return EFAULT when
optval=NULL,I will post a patch to fix them:)

> Thanks.

-- 
Regards
Yang Hongyang