From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH] nvme_fc: fix ctrl create failures racing with workq items
Date: Thu, 15 Mar 2018 14:30:08 -0600 [thread overview]
Message-ID: <20180315203007.GE30695@localhost.localdomain> (raw)
In-Reply-To: <20180313164807.8981-1-jsmart2021@gmail.com>
On Tue, Mar 13, 2018@09:48:07AM -0700, James Smart wrote:
> If there are errors during initial controller create, the transport
> will teardown the partially initialized controller struct and free
> the ctlr memory. Trouble is - most of those errors can occur due
> to asynchronous events happening such io timeouts and subsystem
> connectivity failures. Those failures invoke async workq items to
> reset the controller and attempt reconnect. Those may be in progress
> as the main thread frees the ctrl memory, resulting in NULL ptr oops.
>
> Prevent this from happening by having the main ctrl failure thread
> changing state to DELETING followed by synchronously cancelling any
> pending queued work item. The change of state will prevent the
> scheduling of resets or reconnect events.
>
> Signed-off-by: James Smart <james.smart at broadcom.com>
Thanks, applied for 4.17.
prev parent reply other threads:[~2018-03-15 20:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-13 16:48 [PATCH] nvme_fc: fix ctrl create failures racing with workq items James Smart
2018-03-15 20:30 ` 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:
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=20180315203007.GE30695@localhost.localdomain \
--to=keith.busch@intel.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