Aw: Re: [BUG] "block: make generic_make_request handle arbitrarily sized bios" breaks boot on parisc-linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Thu, Feb 25, 2016 at 7:28 AM, John David Anglin <dave.anglin@xxxxxxxx> wrote:
> > On 2016-02-24, at 4:36 PM, Helge Deller wrote:
> >
> >> Maybe Dave has more luck, otherwise I'll continue to try to get some info.
> >
> > I tried your patch on the commit in linux-block which first failed to boot.  As with Helge, the
> > system crashed and no useful data was output on console.  I then applied following patch
> > to give some extra segments and tired again:
> >
> > diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> > index b1a2631..b421f03 100644
> > --- a/drivers/scsi/scsi_lib.c
> > +++ b/drivers/scsi/scsi_lib.c
> > @@ -595,6 +595,11 @@ static int scsi_alloc_sgtable(struct scsi_data_buffer *sdb, int nents, bool mq)
> >
> >         BUG_ON(!nents);
> >
> > +       /* Provide extra entries in case of split.  */
> > +       nents += 8;
> > +       if (nents > SCSI_MAX_SG_SEGMENTS)
> > +               nents = SCSI_MAX_SG_SEGMENTS;
> > +
> 
> Yeah, this is needed for sake of safety.
> 
> >         if (mq) {
> >                 if (nents <= SCSI_MAX_SG_SEGMENTS) {
> >                         sdb->table.nents = nents;
> >
> > The attached file shows the crash in first boot.  The second boot was successful and various output
> > was generated by your check code.
> 
> From the following log(just select one simple, and looks all are similar) in
> 2nd boot, the bi_phys_segments is figured out as one by block core
> , which is wrong because the max segment size is 64k according to
> your investigation in the below link, but the whole req/bio is 192k(4k*48).
> 
>     http://www.spinics.net/lists/linux-parisc/msg06749.html
> 
> Looks weird, it shouldn't have happened because blk_bio_segment_split()
> does respect the max segment size limit.
> 
> BTW, what is the scsi driver for the device?

It happens with various drivers.
sym53c8xx (on my machine) and mptspi (Fusion MPT, on Daves machine).
Then we have PATA/SATA controllers too: sil680, sata_sil24, pata_ns87415.
The problem can be reproduced by using sym53c8xx or mptsi and blacklisting all others.

Helge
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux