Received: by 10.213.65.68 with SMTP id h4csp1705618imn; Sun, 8 Apr 2018 09:32:44 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/FGQ2Tu8E2FgOjZgYJr36PxuamZjRgFx5lP3HYtdqXsKJ2aYcHEOZIUpqGnarvO/G+kKNg X-Received: by 2002:a17:902:2c83:: with SMTP id n3-v6mr33346175plb.140.1523205164116; Sun, 08 Apr 2018 09:32:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523205164; cv=none; d=google.com; s=arc-20160816; b=G9+Pg5FFGTaF1qcuOsuvd71YAv2Di+PM6AKAzj4zTsDSt8OrJMZbc0s24/HOFVwsoV u5IgEMYeknOBDcp0HXRfSavpKlm2tS1LLN3npCkZ420bxlnwGC31LH7mhA5zmhHgrlFO b4PTDpCT0vsnguxV1aK22QqB2j3M+pdsHdUsB61dBZHq4XKcA+uBM03T9pU3CgGBje1z sgfMQ3w4sF7B0Zuf3cFE3N/nOY8zRfKIqWCQ+ykkZvxX5LPsBup+ZcFvgjClOR/A/JEH pn0wxXPZ9i4rdAaYgQjMnrV1GHQ1XEGjdBEuICrv6UCODODR9xMSsrI8nhFYseY6Uxc3 S4tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=DSt/ddtej/TDkAhQS/Avg17Fn8A9NWwrThhT6GSNA1k=; b=EZ5vZtBgykdVu3ByMRR/HcYzgexHVtL+wXKEeM3hAjgOVAxNMtv7gMsamVT38ffmn8 0onXnex7WZUsqyh26A1rkPiS+cFpBXO0gMPUMJFtloQcASfiGKrgADsYu/YNlO6GyxRK 3u+6Uo7Hmr7AgwXoyrv5hKYnUA3kKI5nX8cX6sSGknHeGP8zq61HifOHadJRWtAkZXtV 45h8K/Hvz73ujTBWCSVLkYuDsU7J612LChi1Ro5JR+EUPgwX9erFKQBiL8q25dK/Zns4 Z2sQUR/wxYrVcG9Af4BX2+Drr+LhUMiYn6Vs6R52DPh54PlnEqlZ+95VEFAUhKw6Gj9F OTXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6-v6si14125720plk.489.2018.04.08.09.32.07; Sun, 08 Apr 2018 09:32:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752530AbeDHQP7 (ORCPT + 99 others); Sun, 8 Apr 2018 12:15:59 -0400 Received: from tn-76-7-174-50.sta.embarqhsd.net ([76.7.174.50]:56934 "EHLO animx.eu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752340AbeDHQP6 (ORCPT ); Sun, 8 Apr 2018 12:15:58 -0400 Received: from wakko by animx.eu.org with local (Exim 4.87 #3 (Debian Bug? What bug /\oo/\)) id 1f5Cyy-0006g3-QX; Sun, 08 Apr 2018 12:15:57 -0400 Date: Sun, 8 Apr 2018 12:15:56 -0400 From: Wakko Warner To: Bart Van Assche Cc: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "richard.weinberger@gmail.com" , "linux-block@vger.kernel.org" Subject: Re: 4.15.14 crash with iscsi target and dvd Message-ID: <20180408161556.GB22869@animx.eu.org> References: <20180401113721.GA8471@animx.eu.org> <20180401163604.GB25011@animx.eu.org> <20180401182723.GA31755@animx.eu.org> <595a10cfb387e6b2ab4d2053b84fed9b3da9e079.camel@wdc.com> <20180406014644.GA16112@animx.eu.org> <20180406020651.GB16112@animx.eu.org> <20180407165335.GA2515@animx.eu.org> <1ff8d234cc565ba9701ce31899fca5faa597e050.camel@wdc.com> <20180408160254.GA22869@animx.eu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180408160254.GA22869@animx.eu.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wakko Warner wrote: > Bart Van Assche wrote: > > Have you tried to modify the kernel Makefile as indicated in the following > > e-mail? This should make the kernel build: > > > > https://lists.ubuntu.com/archives/kernel-team/2016-May/077178.html > > Thanks. That helped. > > I finished with git bisect. Here's the output: > 84c8590646d5b35804bac60eb58b145839b5893e is the first bad commit > commit 84c8590646d5b35804bac60eb58b145839b5893e > Author: Ming Lei > Date: Fri Nov 11 20:05:32 2016 +0800 > > target: avoid accessing .bi_vcnt directly > > When the bio is full, bio_add_pc_page() will return zero, > so use this information tell when the bio is full. > > Also replace access to .bi_vcnt for pr_debug() with bio_segments(). > > Reviewed-by: Christoph Hellwig > Signed-off-by: Ming Lei > Reviewed-by: Sagi Grimberg > Signed-off-by: Jens Axboe > > :040000 040000 a3ebbb71c52ee4eb8c3be4d033b81179211bf704 de39a328dbd1b18519946b3ad46d9302886e0dd0 M drivers > > I did a diff between HEAD^ and HEAD and manually patched the file from > 4.15.14. It's not an exact revert. I'm running it now and it's working. > I'll do a better test later on. Here's the patch: > > --- a/drivers/target/target_core_pscsi.c 2018-02-04 14:31:31.077316617 -0500 > +++ b/drivers/target/target_core_pscsi.c 2018-04-08 11:43:49.588641374 -0400 > @@ -915,7 +915,9 @@ > bio, page, bytes, off); > pr_debug("PSCSI: bio->bi_vcnt: %d nr_vecs: %d\n", > bio_segments(bio), nr_vecs); > - if (rc != bytes) { > + if (rc != bytes) > + goto fail; > + if (bio->bi_vcnt > nr_vecs) { > pr_debug("PSCSI: Reached bio->bi_vcnt max:" > " %d i: %d bio: %p, allocating another" > " bio\n", bio->bi_vcnt, i, bio); > > I really appreciate your time and assistance with this. One thing I noticed after doing this is errors in the kernel log on the initiator: [9072625.181744] sr 26:0:0:0: [sr1] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08 [9072625.181802] sr 26:0:0:0: [sr1] tag#0 Sense Key : 0x2 [current] [9072625.181835] sr 26:0:0:0: [sr1] tag#0 ASC=0x8 ASCQ=0x0 [9072625.181866] sr 26:0:0:0: [sr1] tag#0 CDB: opcode=0x28 28 00 00 0a 81 22 00 00 80 00 [9072625.181919] blk_update_request: I/O error, dev sr1, sector 2753672 When doing the exact same thing on the target, no mention. My patch may not be right, but it doesn't cause an oops. I'm going to try 4.16.1 and see what happens. -- Microsoft has beaten Volkswagen's world record. Volkswagen only created 22 million bugs.