From: Christoph Hellwig <hch@infradead.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
Christoph Hellwig <hch@infradead.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Douglas Gilbert <dgilbert@interlog.com>,
linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 2/2] uas: Make uas work with blk-mq
Date: Fri, 3 Oct 2014 01:47:09 -0700 [thread overview]
Message-ID: <20141003084709.GA21274@infradead.org> (raw)
In-Reply-To: <1412256350.6343.18.camel@jarvis>
On Thu, Oct 02, 2014 at 09:25:50AM -0400, James Bottomley wrote:
> OK, so 3.17 should be on sunday giving three days or so to sort this
> out. If you're happy with blk-mq being disabled so the bug never
> triggers unless the user activates it, doing nothing is my preferred
> outcome ... but that also means no need to backport to stable.
>
> If you want a it fixed in 3.17, then we need a patch from you now.
> Ultimately you have to judge the necessity for us, since it's your
> driver.
scsi-mq might be new and not default, but I wouldn't really consider it
"experimental" in the sense that people should expect crashes if they
attach a usb device.
Please consider applying the patch below for 3.17, as there is a cxgb
patch pending anyway:
---
>From 8a42ea1369701960a821b7fa9a3da5c68e7e4366 Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <hch@lst.de>
Date: Fri, 3 Oct 2014 10:45:10 +0200
Subject: uas: disable use of blk-mq I/O path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The uas driver uses the block layer tag for USB3 stream IDs. With
blk-mq we can get larger tag numbers that the queue depth, which breaks
this assumption. A fix is under way for 3.18, but sits on top of
large changes so can't easily be backported. Set the disable_blk_mq
path so that a uas device can't easily crash the system when using
blk-mq for SCSI.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/usb/storage/uas.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 3f42785..9bfa725 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -970,6 +970,13 @@ static struct scsi_host_template uas_host_template = {
.cmd_per_lun = 1, /* until we override it */
.skip_settle_delay = 1,
.ordered_tag = 1,
+
+ /*
+ * The uas drivers expects tags not to be bigger than the maximum
+ * per-device queue depth, which is not true with the blk-mq tag
+ * allocator.
+ */
+ .disable_blk_mq = true,
};
#define UNUSUAL_DEV(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax, \
--
1.9.1
next prev parent reply other threads:[~2014-10-03 8:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-02 10:04 [PATCH 1/2] uas: Reduce number of function arguments for uas_alloc_foo functions Hans de Goede
[not found] ` <1412244280-15111-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-10-02 10:04 ` [PATCH 2/2] uas: Make uas work with blk-mq Hans de Goede
2014-10-02 11:26 ` Christoph Hellwig
[not found] ` <20141002112627.GC17628-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2014-10-02 12:35 ` Hans de Goede
[not found] ` <542D467E.2020400-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-10-02 13:06 ` Christoph Hellwig
2014-10-02 13:08 ` Hans de Goede
2014-10-02 13:12 ` Christoph Hellwig
2014-10-02 13:18 ` Hans de Goede
[not found] ` <542D5096.9010503-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-10-02 13:25 ` James Bottomley
2014-10-02 13:29 ` Hans de Goede
2014-10-03 8:47 ` Christoph Hellwig [this message]
[not found] ` <20141003084709.GA21274-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2014-10-03 9:25 ` Hans de Goede
[not found] ` <20141002131259.GA930-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2014-10-02 13:27 ` Greg Kroah-Hartman
2014-10-02 11:24 ` [PATCH 1/2] uas: Reduce number of function arguments for uas_alloc_foo functions Christoph Hellwig
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=20141003084709.GA21274@infradead.org \
--to=hch@infradead.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=dgilbert@interlog.com \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.