From: Hannes Reinecke <hare@suse.de>
To: Sumit Saxena <sumit.saxena@broadcom.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
James Bottomley <james.bottomley@hansenpartnership.com>,
linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCH 3/5] megaraid_sas: do not crash on invalid completion
Date: Fri, 11 Nov 2016 16:07:39 +0100 [thread overview]
Message-ID: <8ed4eddb-1102-4a69-907c-c9d1d8e32ece@suse.de> (raw)
In-Reply-To: <5f5b5d4c3503fabc4344b8eddfc30129@mail.gmail.com>
On 11/11/2016 12:51 PM, Sumit Saxena wrote:
>> -----Original Message-----
>> From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-
>> owner@vger.kernel.org] On Behalf Of Hannes Reinecke
>> Sent: Friday, November 11, 2016 3:15 PM
>> To: Martin K. Petersen
>> Cc: Christoph Hellwig; James Bottomley; Sumit Saxena; linux-
>> scsi@vger.kernel.org; Hannes Reinecke; Hannes Reinecke
>> Subject: [PATCH 3/5] megaraid_sas: do not crash on invalid completion
>>
>> Avoid a kernel oops when receiving an invalid command completion.
> scmd_local set to NULL(for cases MPI2_FUNCTION_SCSI_IO_REQUEST and
> MEGASAS_MPI2_FUNCTION_LD_IO_REQUEST) will be serious bug(either in driver
> or firmware) which should be debugged
> and driver should not really continue beyond that. This indicates that
> driver internal frames are corrupted. If needed, whenever driver detects
> it, it can mark the adapter as dead(stopping further activities).
> If OS is installed behind megasas controller then after declaring adapter
> dead, system reboot will be required. Kernel panic may give here more
> information whenever this condition hits so we kept it like this.
> If you are facing this issue, please share the details. I will work on
> this.
>
I have come across this problem when developing scsi-mq support. Due to
the missing mmio barrier when writing to the inbound queue port the I/O
submission became confused, resulting in already completed frames on the
completion queue.
While I do agree this is a pretty serious problem, the driver should
_not_ crash; after all, it just received a completion for an unknown
command. No reason to take the kernel down.
I'd be in favour of resetting the HBA and taking it offline if required,
but we really should not crash here.
Incidentally, we _will_ take the HBA offline even now, as these invalid
command completions causes a scsi timeout for the original command, and
as the HBA couldn't send completions for them the driver would
eventually offline the card. So it worked as expected from my POV.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
next prev parent reply other threads:[~2016-11-11 15:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-11 9:44 [PATCH 0/5] megaraid_sas: scsi-mq support Hannes Reinecke
2016-11-11 9:44 ` [PATCH 1/5] megaraid_sas: switch to pci_alloc_irq_vectors Hannes Reinecke
2016-11-11 11:32 ` Sumit Saxena
2016-11-11 14:59 ` Hannes Reinecke
2016-11-14 12:33 ` Christoph Hellwig
2016-11-14 12:48 ` Christoph Hellwig
2016-11-11 9:44 ` [PATCH 2/5] megaraid_sas: avoid calling megasas_lookup_instance() Hannes Reinecke
2016-11-11 10:46 ` Sumit Saxena
2016-11-11 9:44 ` [PATCH 3/5] megaraid_sas: do not crash on invalid completion Hannes Reinecke
2016-11-11 11:51 ` Sumit Saxena
2016-11-11 15:07 ` Hannes Reinecke [this message]
2016-11-11 9:44 ` [PATCH 4/5] megaraid_sas: scsi-mq support Hannes Reinecke
2016-11-11 11:26 ` kbuild test robot
2016-11-11 11:56 ` Sumit Saxena
2016-11-14 11:07 ` Kashyap Desai
2016-11-11 9:44 ` [PATCH 5/5] megaraid_sas: add mmio barrier after register writes Hannes Reinecke
2016-11-11 10:47 ` Sumit Saxena
2016-11-18 15:53 ` Tomas Henzl
2016-11-18 16:48 ` Kashyap Desai
2016-11-21 15:57 ` Tomas Henzl
2016-11-30 6:14 ` Kashyap Desai
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=8ed4eddb-1102-4a69-907c-c9d1d8e32ece@suse.de \
--to=hare@suse.de \
--cc=hare@suse.com \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sumit.saxena@broadcom.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).