netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Moriarty <joe.moriarty@oracle.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH v1 1/1] drivers: isdn: NULL pointer dereference [null-pointer-deref] (CWE 476) problem
Date: Tue, 20 Feb 2018 08:47:10 -0500	[thread overview]
Message-ID: <48ef81e7-d37e-af87-bf45-563df024d06b@oracle.com> (raw)
In-Reply-To: <20180216.161113.1723060969096847561.davem@davemloft.net>

On 2/16/2018 4:11 PM, David Miller wrote:
> From: Joe Moriarty <joe.moriarty@oracle.com>
> Date: Thu, 15 Feb 2018 15:27:00 -0500
> 
>> The Parfait (version 2.1.0) static code analysis tool found the
>> following NULL pointer dereference problem.
>>
>> - drivers/isdn/mISDN/core.c
>> function channelmap_show() does not check the returned mdev
>> variable from dev_to_mISDN() for NULL.  Added the check for
>> NULL, which results in a value of 0 being returned.
>>
>> Signed-off-by: Joe Moriarty <joe.moriarty@oracle.com>
>> Reviewed-by: Jonathan Helman <jonathan.helman@oracle.com>
> 
> Since the lifetime for the sysfs files for these devices is strictly
> smaller than the lifetime of the 'dev' object and it's driver data,
> it is not possible for mdev to be NULL in this situation.
> 
> I understand what the static checker is trying to do, but within
> context this lack of a NULL check is legitimate.
> 
> I'm not applying this, sorry.
> 
Thanks for the review David and there is no reason to be sorry.  I'll 
will mark this as a false positive result from our static checker.

      reply	other threads:[~2018-02-20 13:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15 20:26 [PATCH v1 0/1] Parfait changes Joe Moriarty
2018-02-15 20:27 ` [PATCH v1 1/1] drivers: isdn: NULL pointer dereference [null-pointer-deref] (CWE 476) problem Joe Moriarty
2018-02-16 21:11   ` David Miller
2018-02-20 13:47     ` Joe Moriarty [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=48ef81e7-d37e-af87-bf45-563df024d06b@oracle.com \
    --to=joe.moriarty@oracle.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.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 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).