netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: steve.glendinning@shawell.net, netdev@vger.kernel.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usbnet: smsc95xx: dereferencing NULL pointer
Date: Tue, 11 Nov 2014 12:00:08 +0530	[thread overview]
Message-ID: <20141111063008.GA4446@sudip-PC> (raw)
In-Reply-To: <20141110.142223.816257623301941276.davem@davemloft.net>

On Mon, Nov 10, 2014 at 02:22:23PM -0500, David Miller wrote:
> From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
> Date: Fri,  7 Nov 2014 18:52:40 +0530
> 
> > we were dereferencing dev to initialize pdata. but just after that we
> > have a BUG_ON(!dev). so we were basically dereferencing the pointer
> > first and then tesing it for NULL.
> > 
> > Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> 
> You didn't even compile test this.
> 
> Do not even bother fixing theoretical issues if you're going to be
> introducing a _REAL_ serious regression into the code with your "fix":
> 
> drivers/net/usb/smsc95xx.c: In function ‘smsc95xx_resume’:
> drivers/net/usb/smsc95xx.c:1674:5: warning: ‘pdata’ is used uninitialized in this function [-Wuninitialized]
>   u8 suspend_flags = pdata->suspend_flags;
>      ^
> 
> So, instead of a theoretical issue, we now have a real guaranteed
> crash.
> 
> You did not compile test this change, and you definitely did not
> functionally test this change either.
> 
> Please do not do this ever again, thanks.

extremely sorry for this.
i have compile tested but don't know how i missed the new warning message.
for any of my patch,if for some reason i am not able to compile test it, i mention that in the comments.
sorry again.

thanks
sudip

      reply	other threads:[~2014-11-11  6:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07 13:22 [PATCH] usbnet: smsc95xx: dereferencing NULL pointer Sudip Mukherjee
2014-11-10 19:22 ` David Miller
2014-11-11  6:30   ` Sudip Mukherjee [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141111063008.GA4446@sudip-PC \
    --to=sudipm.mukherjee@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=steve.glendinning@shawell.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).