From: James Bottomley <James.Bottomley@suse.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] SCSI bug fixes for 2.6.36-rc7
Date: Wed, 13 Oct 2010 20:24:59 -0400 [thread overview]
Message-ID: <1287015899.10264.394.camel@mulgrave.site> (raw)
In-Reply-To: <AANLkTimUT37LfmnU8Rc0+K8r+owCp9e_VyriDHRyuuhr@mail.gmail.com>
On Wed, 2010-10-13 at 16:49 -0700, Linus Torvalds wrote:
> On Wed, Oct 13, 2010 at 6:45 AM, James Bottomley
> <James.Bottomley@suse.de> wrote:
> > This patch set fixes a couple of longstanding bugs in SCSI. The VPD
> > patch fix a possible buffer overrun in the VPD code (only tripped if the
> > device has a huge number of VPD pages). The other is where the status
> > return code on our BSG interface is wrongly right shifted one place.
>
> Umm. That other patch seems to be utter crap.
>
> > - hdr->device_status = status_byte(rq->errors);
> > + hdr->device_status = rq->errors && 0xff;
>
> That's pure shit. Please look at it for one second, and don't send me
> crap like this.
What's wrong with it? device_status() is an ancient SCSI-1 macro that
dates from the time the status was left shifted by 1, which makes the
value wrong according to the sg interface spec. We should really remove
it, but there's still a few ancient drivers using it. the SG interface
requires the full status byte, which is what the bottom most byte of
req_errors is ... hence the change.
James
next prev parent reply other threads:[~2010-10-14 0:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-13 13:45 James Bottomley
2010-10-13 23:49 ` Linus Torvalds
2010-10-14 0:24 ` James Bottomley [this message]
2010-10-14 0:29 ` Harvey Harrison
2010-10-14 0:34 ` James Bottomley
2010-10-14 6:36 ` FUJITA Tomonori
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=1287015899.10264.394.camel@mulgrave.site \
--to=james.bottomley@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®