From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ming Lei Subject: Re: [BUG bisect] kernel BUG at block/bio.c:1833 and fail to mount disk Date: Thu, 17 Jan 2019 18:26:58 +0800 Message-ID: <20190117102657.GB20220@ming.t460p> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Krzysztof Kozlowski Cc: Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Omar Sandoval , "linux-samsung-soc@vger.kernel.org" , linux-arm-kernel@lists.infradead.org, "linux-next@vger.kernel.org" List-Id: linux-next.vger.kernel.org On Wed, Jan 16, 2019 at 09:54:05AM +0100, Krzysztof Kozlowski wrote: > On Wed, 16 Jan 2019 at 09:52, Krzysztof Kozlowski wrote: > > > > Hi, > > > > On today's next-20190116 I see a bug during boot: > > [ 6.843308] kernel BUG at ../block/bio.c:1833! > > [ 6.847723] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM > > ... > > [ 7.543824] [] (bio_split) from [<00000000>] ( (null)) > > [ 7.549881] Code: 13833b01 11c630bc e1a00006 e8bd8070 (e7f001f2) > > > > (not much in the calltrace) > > On all my boards. Also QEMU-arm fails. > > > > I forgot the bisect commit: > > 258cfdfaf7bd729e759a0a91fd00ac9794796ad3 is the first bad commit > commit 258cfdfaf7bd729e759a0a91fd00ac9794796ad3 > Author: Ming Lei > Date: Fri Jan 11 19:01:15 2019 +0800 > > block: use bio_for_each_bvec() to compute multi-page bvec count > > :040000 040000 d79b2e71d308650df4764ff644f29d3a24dbab96 > 0a5d624843b805ee0c9fd9a7e2d5163f5b15b167 M block It should be one 32-bit arch specific issue, I guess. The following patch should fix this issue: diff --git a/block/blk-merge.c b/block/blk-merge.c index dc4877eaf9f9..4dd7183de849 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -166,6 +166,9 @@ static unsigned get_max_segment_size(struct request_queue *q, { unsigned long mask = queue_segment_boundary(q); + if (mask == BLK_SEG_BOUNDARY_MASK) + return queue_max_segment_size(q); + return min_t(unsigned long, mask - (mask & offset) + 1, queue_max_segment_size(q)); } Thanks, Ming