public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Cc: devel@driverdev.osuosl.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, Masood Mehmood <ody.guru@gmail.com>
Subject: Re: [PATCH] Fix for possible null pointer dereference in node.c
Date: Sun, 18 May 2014 19:22:53 +0300	[thread overview]
Message-ID: <20140518162253.GM15585@mwanda> (raw)
In-Reply-To: <CAFo99gbnN8j8WgY3O1eDgkpkmJU11X8-9cCU_0_s7TRN8wNW+Q@mail.gmail.com>

On Sun, May 18, 2014 at 05:49:52PM +0200, Rickard Strandqvist wrote:
> Hi
> 
> When I run cppcheck find the about 5,000 errors, of these, I selected
> the 100 most serious and has made patches. But my ability to immerse
> myself in each failure has been limited unfortunately.
> 

I am familiar with that feeling.  ;)

With Smatch, I ignore inconsistent NULL checking like this when we know
that the parameter is always non-NULL.  It was just too much hassle to
deal with.

These days I tend to report more bugs instead of fixing them myself.  I
run on linux-next and complain to the original author as soon as the
buggy code is merged.  If the code is old, then my experience is that no
one will fix it.

Also 5000 inconsistent NULL checks seems like too high of a figure.  For
my inconsistent NULL checks I get 215 of these warnings:

	sound/i2c/other/ak4xxx-adda.c:808 build_adc_controls()
	error: we previously assumed 'ak->adc_info' could be null (see line 789)

And 75 of these:

	fs/efs/inode.c:298 efs_map_block()
	warn: variable dereferenced before check 'bh' (see line 292)

regards,
dan carpenter


  reply	other threads:[~2014-05-18 16:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-15 21:53 [PATCH] Fix for possible null pointer dereference in node.c Rickard Strandqvist
2014-05-15 22:08 ` Greg Kroah-Hartman
2014-05-15 22:14   ` Rickard Strandqvist
2014-05-15 22:43 ` Dan Carpenter
2014-05-17 13:21   ` Rickard Strandqvist
2014-05-17 18:56     ` Dan Carpenter
2014-05-18 15:49       ` Rickard Strandqvist
2014-05-18 16:22         ` Dan Carpenter [this message]
2014-05-18 17:14           ` Rickard Strandqvist

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=20140518162253.GM15585@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ody.guru@gmail.com \
    --cc=rickard_strandqvist@spectrumdigital.se \
    /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