All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] nouveau: move dereferences after null checks
Date: Sun, 7 Feb 2010 21:46:35 +0100	[thread overview]
Message-ID: <20100207204635.GA3339@joi.lan> (raw)
In-Reply-To: <20100130144100.GA2902-OI9uyE9O0yo@public.gmane.org>

On Sat, Jan 30, 2010 at 03:41:00PM +0100, Marcin Slusarz wrote:
> On Fri, Jan 29, 2010 at 12:00:49PM +0300, Dan Carpenter wrote:
> > These bugs are when code dereferences a variable and then checks that it is not null.
> > The new thing is that I wrote a shell script to try remove the false positives caused
> > by macros.  There are still some false positives because smatch is bad at handling 
> > loops and knowing when a container got redefined.
> > 
> > Sometimes the fixes are not obvious.
> > 
> > This is the output of: /path/to/smatch_scripts/filter_kernel_deref_check.sh warns.txt
> > 
> > regards,
> > dan carpenter
> > 
> > (...)
> > drivers/gpu/drm/nouveau/nouveau_object.c +891 'chan': if (!chan || !gpuobj_ret || *gpuobj_ret != NULL)
> > drivers/gpu/drm/nouveau/nouveau_sgdma.c +61 'nvbe': if (nvbe && nvbe->pages) {
> > drivers/gpu/drm/nouveau/nouveau_connector.c +91 'connector': if (!connector)
> > drivers/gpu/drm/nouveau/nv50_crtc.c +306 'crtc': if (!crtc)
> > (...)
> 
> ---
> From: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Subject: [PATCH] nouveau: move dereferences after null checks
> 
> Reported-by: Dan Carpenter <error27-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---

ping

      parent reply	other threads:[~2010-02-07 20:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-29  9:00 bug list: dereferencing first then checking Dan Carpenter
2010-01-29  9:00 ` Dan Carpenter
2010-01-29  9:54 ` Dan Carpenter
2010-01-30 14:41 ` [PATCH] nouveau: move dereferences after null checks Marcin Slusarz
2010-01-30 14:41   ` Marcin Slusarz
2010-01-30 14:41   ` Marcin Slusarz
     [not found]   ` <20100130144100.GA2902-OI9uyE9O0yo@public.gmane.org>
2010-02-07 20:46     ` Marcin Slusarz [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=20100207204635.GA3339@joi.lan \
    --to=marcin.slusarz-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.