lkml.org 
[lkml]   [2010]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] ipv4/ip_sockglue.c: copy msg_control optval from user to kernel space
From
From: "H Hartley Sweeten" <hartleys@visionengravers.com>
Date: Sat, 16 Jan 2010 01:22:21 -0500

> On Fri 1/15/2010 8:30 PM, David Miller wrote:
>> How did you test your change?
>
> Hmm... I saw the sparse warning and tried this to fix it. The code compiled
> fine and the warning was gone. When I booted the resulting kernel I didn't
> see any issues. I must not have went down this code path in my testing.

I'm going to ask you a second time.

What was your test case? How did you test the change?

I don't think you tested your change at all besides seeing that gcc
would accept the code and sparse stopped spitting out a warning. And
you're vagueness about your testing methodology will only work to
confirm my suspicions.

I find it unlikely, at best, for you to have tested that code path, as
'msg' is an uninitilized stack variable at this point in the code, so
'msg->msg_control' is going to be a garbage pointer, and therefore
copying to it would result in a crash.

I don't even think you read and understood the code you are editing.

I suspect you just wanted to kill the sparse warning somehow, you
found a way that made the compiler and sparse eat it, and you simply
ran with it.

And that really upsets me.

Fixing sparse warnings should not be a mindless exercise. You should
understand the code you are changing.


\
 
 \ /
  Last update: 2010-01-16 09:53    [W:0.036 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site