public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "mwilck@suse.com" <mwilck@suse.com>,
	"hare@suse.de" <hare@suse.de>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "mauricfo@linux.vnet.ibm.com" <mauricfo@linux.vnet.ibm.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH v2 4/4] scsi_dh_alua: take sdev reference in alua_bus_attach
Date: Fri, 12 May 2017 16:21:52 +0000	[thread overview]
Message-ID: <1494606110.14477.1.camel@sandisk.com> (raw)
In-Reply-To: <20170512131508.3231-5-mwilck@suse.com>

On Fri, 2017-05-12 at 15:15 +0200, Martin Wilck wrote:
> Modification of the access_state field in struct scsi_device
> in alua_rtpg() may race with alua_bus_detach(). Avoid
> the scsi_device struct to be freed while it's being processed
> in the alua code by taking a reference.

Hello Martin,

The approach of this patch seems weird to me. I don't think that it is a
good idea to let any ALUA work continue while alua_bus_detach() is in progress.
Have you considered to stop the ALUA work from inside alua_bus_detach() by
using cancel_work_sync()?

Bart.

      reply	other threads:[~2017-05-12 16:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-12 13:15 [PATCH v2 0/4] failover fixes for scsi_dh_alua Martin Wilck
2017-05-12 13:15 ` [PATCH v2 1/4] scsi_dh_alua: Do not modify the interval value for retries Martin Wilck
2017-05-12 16:25   ` Bart Van Assche
2017-05-12 13:15 ` [PATCH v2 2/4] scsi_dh_alua: Do not retry for unmapped device Martin Wilck
2017-05-12 16:26   ` Bart Van Assche
2017-05-12 13:15 ` [PATCH v2 3/4] scsi_dh_alua: do not call BUG_ON when updating port group Martin Wilck
2017-05-12 16:24   ` Bart Van Assche
2017-05-15  8:16     ` Martin Wilck
2017-05-15 16:03       ` Bart Van Assche
2017-05-15 18:30         ` Martin Wilck
2017-05-21  7:19           ` Christoph Hellwig
2017-05-12 13:15 ` [PATCH v2 4/4] scsi_dh_alua: take sdev reference in alua_bus_attach Martin Wilck
2017-05-12 16:21   ` Bart Van Assche [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=1494606110.14477.1.camel@sandisk.com \
    --to=bart.vanassche@sandisk.com \
    --cc=hare@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mauricfo@linux.vnet.ibm.com \
    --cc=mwilck@suse.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