linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	Bart Van Assche <bvanassche@acm.org>,
	James Bottomley <jbottomley@parallels.com>,
	Alan Stern <stern@rowland.harvard.edu>
Subject: Re: [PATCH 3/3] scsi: proper state checking and module refcount handling in scsi_device_get
Date: Wed, 29 Apr 2015 15:27:58 +0200	[thread overview]
Message-ID: <20150429132758.GA4048@lst.de> (raw)
In-Reply-To: <CAC5umyiSEmBOLT2MeztTq8z5-wE3koXpRQkD+tuX8b-PMg-e+A@mail.gmail.com>

On Wed, Apr 29, 2015 at 10:17:59AM +0900, Akinobu Mita wrote:
> This change broke ufs driver.

I'd claim the ufs driver, or rather more specifily the ufs spec
had already been broken.  That whole concept of keeping references
to scsi devices to send commands to for host state changes is just
fundamentally broken.  

> The reason for scsi_device_get() in ufshcd_set_dev_pwr_mode() is
> to avoid manual delete of UFS device W-LUN by holding the reference
> to it.  So can we acquire shost->scan_mutex lock instead of
> scsi_device_get()?  I tried attached patch and it seems to be working,
> but I would like to ask your opinion about this change.

It seems like a reasonable workaround.  But then again the concept
of the driver hanging on scsi_devices is and will stay broken.

  reply	other threads:[~2015-04-29 13:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-02 13:01 [PATCH 1/3] scsi: serialize ->rescan against ->remove Christoph Hellwig
2015-02-02 13:01 ` [PATCH 2/3] sd: don't grab a device references from driver methods Christoph Hellwig
2015-03-10 16:21   ` Hannes Reinecke
2015-02-02 13:01 ` [PATCH 3/3] scsi: proper state checking and module refcount handling in scsi_device_get Christoph Hellwig
2015-03-05 13:36   ` Paolo Bonzini
2015-03-10 16:22   ` Hannes Reinecke
2015-04-29  1:17   ` Akinobu Mita
2015-04-29 13:27     ` Christoph Hellwig [this message]
2015-03-05 13:33 ` [PATCH 1/3] scsi: serialize ->rescan against ->remove Christoph Hellwig
2015-03-05 13:37   ` Paolo Bonzini
2015-03-16 17:29     ` Paolo Bonzini
2015-03-05 13:36 ` Paolo Bonzini
2015-03-10 16:20 ` Hannes Reinecke
  -- strict thread matches above, loose matches on Subject: below --
2015-01-28 23:00 Christoph Hellwig
2015-01-28 23:00 ` [PATCH 3/3] scsi: proper state checking and module refcount handling in scsi_device_get Christoph Hellwig
2015-01-29 14:46   ` James Bottomley

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=20150429132758.GA4048@lst.de \
    --to=hch@lst.de \
    --cc=akinobu.mita@gmail.com \
    --cc=bvanassche@acm.org \
    --cc=jbottomley@parallels.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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).