Re: [PATCH 0/2] scsi: two SG_CHAIN related fixes

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

 



Hi Guenter,

Thanks for your test and report!

On Tue, Jun 04, 2019 at 06:38:49AM -0700, Guenter Roeck wrote:
> On Tue, Jun 04, 2019 at 04:23:06PM +0800, Ming Lei wrote:
> > Hi,
> > 
> > Guenter reported scsi boot issue caused by commit c3288dd8c232
> > ("scsi: core: avoid pre-allocating big SGL for data").
> > 
> > Turns out there are at least two issues.
> > 
> > The 1st patch fixes issue in case that NO_SG_CHAIN on some ARCHs,
> > such as alpha, arm and parisc.
> > 
> > The 2nd patch makes esp scsi working with SG_CHAIN.
> > 
> 
> Both patches applied on top of next-20190604.
> 
> Results on alpha:
> 
> Waiting for root device /dev/sda...
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 7 at mm/slab.h:359 kmem_cache_free+0x120/0x2a0
> virt_to_cache: Object is not a Slab page!

Please apply the following patch against the posted two:

diff --git a/lib/sg_pool.c b/lib/sg_pool.c
index 47eecbe094d8..e042a1722615 100644
--- a/lib/sg_pool.c
+++ b/lib/sg_pool.c
@@ -122,7 +122,7 @@ int sg_alloc_table_chained(struct sg_table *table, int nents,
 	}
 
 	/* User supposes that the 1st SGL includes real entry */
-	if (nents_first_chunk == 1) {
+	if (nents_first_chunk <= 1) {
 		first_chunk = NULL;
 		nents_first_chunk = 0;
 	}

Thanks,
Ming



[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