public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@suse.de>
To: ltuikov@yahoo.com
Cc: Alan Stern <stern@rowland.harvard.edu>,
	Richard Senior <richard@r-senior.demon.co.uk>,
	SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] sd: Fix regression in sd_read_cache_type
Date: Wed, 23 Mar 2011 10:16:48 -0500	[thread overview]
Message-ID: <1300893408.15899.17.camel@mulgrave.site> (raw)
In-Reply-To: <469812.82249.qm@web31812.mail.mud.yahoo.com>

On Wed, 2011-03-23 at 07:06 -0700, Luben Tuikov wrote:
> --- On Mon, 3/21/11, Alan Stern <stern@rowland.harvard.edu> wrote:
> > From: Alan Stern <stern@rowland.harvard.edu>
> > Subject: [PATCH] sd: Fix regression in sd_read_cache_type
> > To: "James Bottomley" <James.Bottomley@suse.de>
> > Cc: "Richard Senior" <richard@r-senior.demon.co.uk>, "Luben Tuikov" <ltuikov@yahoo.com>, "SCSI development list" <linux-scsi@vger.kernel.org>
> > Date: Monday, March 21, 2011, 2:29 PM
> > This patch (as1454) fixes a
> > regression in the sd driver.  Commit
> > 24d720b726c1a85f1962831ac30ad4d2ef8276b1 ([SCSI] Retrieve
> > the Caching
> > mode page) recently introduced the strategy of asking for
> > all pages
> > (page code 0x3F) instead of asking for the caching page
> > (0x08) on
> > devices that might not support it.  This ought to be
> > safe, because sd
> > already uses page code 0x3F when checking for write
> > protection.
> > 
> > Unfortunately, the commit did not copy the checks used by
> > sd_read_write_protect_flag().  Some devices don't
> > support page code
> > 0x3F, and others require a fixed transfer length of 192
> > bytes.  This
> > patch adds those checks into sd_read_cache_type().
> > 
> > Without this fix, some USB mass-storage devices crash when
> > they
> > receive a MODE SENSE command with page code 0x3F asking for
> > only 4
> > bytes of data.
> > 
> > Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
> > Reported-and-tested-by: Richard Senior <richard@r-senior.demon.co.uk>
> > CC: Luben Tuikov <ltuikov@yahoo.com>
> > CC: <stable@kernel.org>
> 
> Acked-by: Luben Tuikov <ltuikov@yahoo.com>

I put the original patch in on the understanding from both of you that
the chances of finding a USB device which crashed with the change was
very small.

Given that several have been found and we're on the eve of the merge
window closure, I'll just revert the original, and you two can work on
getting a bullet proof version for the next merge window.

James



  reply	other threads:[~2011-03-23 15:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-21 21:29 [PATCH] sd: Fix regression in sd_read_cache_type Alan Stern
2011-03-23 14:06 ` Luben Tuikov
2011-03-23 15:16   ` James Bottomley [this message]
2011-03-23 15:54     ` Luben Tuikov
2011-03-23 16:12     ` Alan Stern
2011-03-23 16:44       ` Luben Tuikov
2011-03-23 17:23         ` Alan Stern
2011-03-23 17:55           ` Luben Tuikov
2011-03-23 18:30             ` Alan Stern
2011-03-23 16:18     ` [PATCH ver. 2] " Alan Stern
2011-03-23 17:40       ` Luben Tuikov

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=1300893408.15899.17.camel@mulgrave.site \
    --to=james.bottomley@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ltuikov@yahoo.com \
    --cc=richard@r-senior.demon.co.uk \
    --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