linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@canonical.com>
To: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
	Christoph Hellwig <hch@infradead.org>,
	Mark Salter <msalter@redhat.com>,
	"James E. J. Bottomley" <JBottomley@odin.com>,
	brking <brking@us.ibm.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, linux-block@vger.kernel.org,
	tom.leiming@gmail.com
Subject: Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!
Date: Sun, 22 Nov 2015 00:56:35 +0800	[thread overview]
Message-ID: <20151122005635.1b9ffbe1@tom-T450> (raw)
In-Reply-To: <565055C6.5040801@linux.vnet.ibm.com>

On Sat, 21 Nov 2015 12:30:14 +0100
Laurent Dufour <ldufour@linux.vnet.ibm.com> wrote:

> On 20/11/2015 13:10, Michael Ellerman wrote:
> > On Thu, 2015-11-19 at 00:23 -0800, Christoph Hellwig wrote:
> >=20
> >> It's pretty much guaranteed a block layer bug, most likely in the
> >> merge bios to request infrastucture where we don't obey the merging
> >> limits properly.
> >>
> >> Does either of you have a known good and first known bad kernel?
> >=20
> > Not me, I've only hit it one or two times. All I can say is I have hit =
it in
> > 4.4-rc1.
> >=20
> > Laurent, can you narrow it down at all?
>=20
> It seems that the panic is triggered by the commit bdced438acd8 ("block:
> setup bi_phys_segments after splitting") which has been pulled by the
> merge d9734e0d1ccf ("Merge branch 'for-4.4/core' of
> git://git.kernel.dk/linux-block").
>=20
> My system is panicing promptly when running a kernel built at
> d9734e0d1ccf, while reverting the commit bdced438acd8, it can run hours
> without panicing.
>=20
> This being said, I can't explain what's going wrong.
>=20
> May Ming shed some light here ?

Laurent, looks there is one bug in blk_bio_segment_split(), would you
mind testing the following patch to see if it fixes your issue?

---
=46rom 6fc701231dcc000bc8bc4b9105583380d9aa31f4 Mon Sep 17 00:00:00 2001
From: Ming Lei <ming.lei@canonical.com>
Date: Sun, 22 Nov 2015 00:47:13 +0800
Subject: [PATCH] block: fix segment split

Inside blk_bio_segment_split(), previous bvec pointer('bvprvp')
always points to the iterator local variable, which is obviously
wrong, so fix it by pointing to the local variable of 'bvprv'.

Signed-off-by: Ming Lei <ming.lei@canonical.com>
---
 block/blk-merge.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/blk-merge.c b/block/blk-merge.c
index de5716d8..f2efe8a 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -98,7 +98,7 @@ static struct bio *blk_bio_segment_split(struct request_q=
ueue *q,
=20
 			seg_size +=3D bv.bv_len;
 			bvprv =3D bv;
-			bvprvp =3D &bv;
+			bvprvp =3D &bvprv;
 			sectors +=3D bv.bv_len >> 9;
 			continue;
 		}
@@ -108,7 +108,7 @@ new_segment:
=20
 		nsegs++;
 		bvprv =3D bv;
-		bvprvp =3D &bv;
+		bvprvp =3D &bvprv;
 		seg_size =3D bv.bv_len;
 		sectors +=3D bv.bv_len >> 9;
 	}
--=20
1.9.1



Thanks,
Ming

  reply	other threads:[~2015-11-21 16:57 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18  9:18 kernel BUG at drivers/scsi/scsi_lib.c:1096! Michael Ellerman
2015-11-18 11:06 ` Laurent Dufour
2015-11-18 11:10   ` Michael Ellerman
2015-11-18 11:17     ` Laurent Dufour
2015-11-18 14:03 ` Mark Salter
2015-11-19  1:02   ` Michael Ellerman
2015-11-19  8:23     ` Christoph Hellwig
2015-11-19 15:35       ` Hannes Reinecke
2015-11-20 14:38         ` Ewan Milne
2015-11-20 14:55           ` Hannes Reinecke
2015-11-20 15:28             ` Ewan Milne
2015-11-23  6:55               ` Hannes Reinecke
2015-11-25  9:04               ` Hannes Reinecke
2015-11-25 17:56                 ` Jens Axboe
2015-11-25 19:10                   ` Hannes Reinecke
2015-11-25 19:24                     ` Jens Axboe
2015-11-25 20:23                       ` Mike Snitzer
2015-11-25 21:20                         ` Mike Snitzer
2015-11-25 18:01                 ` Mike Snitzer
2015-11-25 19:01                   ` Hannes Reinecke
2015-12-04 16:59                     ` Takashi Iwai
2015-12-04 17:02                       ` Jens Axboe
2015-12-04 17:09                         ` Takashi Iwai
2015-11-20 12:10       ` Michael Ellerman
2015-11-20 12:56         ` Laurent Dufour
2015-11-20 13:37           ` Mark Salter
2015-11-21 11:30         ` Laurent Dufour
2015-11-21 16:56           ` Ming Lei [this message]
2015-11-22 23:20             ` Mark Salter
2015-11-23  0:36               ` Ming Lei
2015-11-23  1:50                 ` Mark Salter
2015-11-23  2:46                   ` Ming Lei
2015-11-23 15:21                     ` Ming Lei
2015-11-24 18:59                       ` Alan Ott
2015-11-23 13:57               ` Laurent Dufour
2015-11-23 15:13                 ` Pratyush Anand
2015-11-23 15:20                   ` Laurent Dufour
2015-11-23 15:27                     ` Ming Lei
2015-11-23 16:24                       ` Laurent Dufour
2015-11-24  1:30                       ` Mark Salter

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=20151122005635.1b9ffbe1@tom-T450 \
    --to=ming.lei@canonical.com \
    --cc=JBottomley@odin.com \
    --cc=brking@us.ibm.com \
    --cc=hch@infradead.org \
    --cc=ldufour@linux.vnet.ibm.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=msalter@redhat.com \
    --cc=tom.leiming@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).