[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <496EC8C2.1090107@cn.fujitsu.com>
Date: Thu, 15 Jan 2009 13:25:22 +0800
From: Yang Hongyang <yanghy@...fujitsu.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
CC: David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH]IPv6:remove duplicate check of optlen when setsockopt
with IPV6_PKTINFO option
Herbert Xu wrote:
> On Thu, Jan 15, 2009 at 04:04:49PM +1100, Herbert Xu wrote:
>> On Wed, Jan 14, 2009 at 09:02:42PM -0800, David Miller wrote:
>>> Actually, we return EINVAL just a few lines above this code
>>> block for some other socket option cases when optval==NULL.
>> Well the very next option IPV6_2292PKTOPTIONS returns EFAULT
>> by virtue of not explicitly checking optval == NULL :)
>
> In fact checking for a NULL pointer is strictly speaking wrong
> since NULL may actually have been mapped in user-space :)
But there are some cases that user-space passes a NULL pointer
to the kernel,Otherwise,copy_from_user needn't to cheak the
NULL pointer either.:)
By the way,I think most part of the ipv6 socket option implementation
are kind of ugly:)
>
> Cheers,
--
Regards
Yang Hongyang
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists