nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Keith Busch <keith.busch@intel.com>
To: Vishal Verma <vishal.l.verma@intel.com>
Cc: linux-nvdimm@lists.01.org
Subject: Re: [ndctl PATCH 1/2] ndctl: fix potential null dereference in the smart error handler
Date: Mon, 13 Aug 2018 08:29:42 -0600	[thread overview]
Message-ID: <20180813142941.GA32027@localhost.localdomain> (raw)
In-Reply-To: <20180811004053.15392-1-vishal.l.verma@intel.com>

On Fri, Aug 10, 2018 at 06:40:52PM -0600, Vishal Verma wrote:
> Static analysis reports that can potentially dereference a NULL pointer
> in the smart cmd error handler. This can particular instance won't ever
> be hit in practice as the handler is only registered for smart commands,
> and smart commands are currently only DIMM commands, and will always
> have a dimm object. However for completeness, and to avoid future
> errors, we should perform a NULL check in the handler anyway.

Hmm, I purposefully didn't have the NULL check because the dimm is never
not set in this path. Looks like a false positive, but the NULL check is
Linux-nvdimm mailing list

      parent reply	other threads:[~2018-08-13 14:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-11  0:40 [ndctl PATCH 1/2] ndctl: fix potential null dereference in the smart error handler Vishal Verma
2018-08-11  0:40 ` [ndctl PATCH 2/2] ndctl, udev: fix a resource leak in save_unsafe_shutdown_count Vishal Verma
2018-08-13 14:29 ` Keith Busch [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:

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

  git send-email \
    --in-reply-to=20180813142941.GA32027@localhost.localdomain \
    --to=keith.busch@intel.com \
    --cc=linux-nvdimm@lists.01.org \
    --cc=vishal.l.verma@intel.com \


* 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).