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

From: Yang Hongyang <[email-masked]>
Date: Wed, 14 Jan 2009 11:54:38 +0800

Herbert Xu wrote:
> Yang Hongyang <[email-masked]> wrote:
>> Actually the condition (optlen == 0) is included in (optlen < sizeof(struct in6_pktinfo)),
>> so we do not need to check it separately.
> 
> You don't need to check optval == NULL either since that's the
> job of copy_from_user.

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

> Cheers,

-- 
Regards
Yang Hongyang