linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Cc: Nagalakshmi Nandigama <Nagalakshmi.Nandigama@lsi.com>,
	Sreekanth Reddy <Sreekanth.Reddy@lsi.com>,
	support@lsi.com,
	"James E.J. Bottomley" <JBottomley@parallels.com>,
	DL-MPTFusionLinux@lsi.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: mpt2sas: mpt2sas_base.c:  Fix for possible null pointer dereference
Date: Wed, 28 May 2014 04:26:28 -0700	[thread overview]
Message-ID: <20140528112628.GB11953@infradead.org> (raw)
In-Reply-To: <1400429439-11184-1-git-send-email-rickard_strandqvist@spectrumdigital.se>

> -	ioc_status = le16_to_cpu(mpi_reply->IOCStatus) & MPI2_IOCSTATUS_MASK;
> +	if (mpi_reply) {
> +		ioc_status = le16_to_cpu(mpi_reply->IOCStatus) & MPI2_IOCSTATUS_MASK;
> +	}
>  
>  	if (ioc_status != MPI2_IOCSTATUS_SUCCESS)
>  		ioc->port_enable_failed = 1;

ioc_status isn't initialized without the reply and used here as well
as later in the function.  I think we'll need input from LSI or others
with the spec on what to do when we didn't get a reply.

  reply	other threads:[~2014-05-28 11:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-18 16:10 [PATCH] scsi: mpt2sas: mpt2sas_base.c: Fix for possible null pointer dereference Rickard Strandqvist
2014-05-28 11:26 ` Christoph Hellwig [this message]
2014-07-03 17:45   ` Joe Lawrence
2014-07-03 18:45     ` 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=20140528112628.GB11953@infradead.org \
    --to=hch@infradead.org \
    --cc=DL-MPTFusionLinux@lsi.com \
    --cc=JBottomley@parallels.com \
    --cc=Nagalakshmi.Nandigama@lsi.com \
    --cc=Sreekanth.Reddy@lsi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=rickard_strandqvist@spectrumdigital.se \
    --cc=support@lsi.com \
    /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).