lkml.org 
[lkml]   [2010]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [GIT PULL] SCSI bug fixes for 2.6.36-rc7
From
Date
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




\
 
 \ /
  Last update: 2010-10-14 02:27    [W:0.045 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site