Received: by 10.213.65.68 with SMTP id h4csp1732605imn; Sun, 8 Apr 2018 10:08:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/dIt2JkgogSxvQMa9fxeNUI2NeWFcpUmAUDeGKjs5AV+xISyNukA0inDaI30zL5ONrKOvR X-Received: by 10.98.185.23 with SMTP id z23mr19216816pfe.180.1523207317567; Sun, 08 Apr 2018 10:08:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523207317; cv=none; d=google.com; s=arc-20160816; b=i2jN6/BC67Aky89uUsrPqLPVNz6VLWRPpLHkFybf0dakh1niFJN5Yw810SGveS/O1i 0DHoeHLYbgIF+YtK/EJ1Lio7C18tDXf65OsuzEMrL8wuToY+dQ8l0oh5GFtBNkr0l4wB Ixiauq024MVXFumTyruq9hDqGl425OOkEH7uEE35jq+xpuFFGz0BsBvSyEH+LYGwM3un dBxVAkgRKWCOZgqsygNMsMgH4PUJf2O06aCXUAp+tywqPjLPZzhYJEV7YdcEdYOS8mbl mkacZurz9d54OHhafrpj5WmKrLO2yU2HgQ8eBVDgEQEv5qgVEtf+qr4e3MJj00ke37JA ySDQ== 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=JgxbHWxHZnEAhPeEWNDGURlHmdwgJ0YSEoikSPDru5A=; b=OqXqk553v9nMhb63rYFdQFcXTfmU4znfT5BGslNZDSew8x5eKeaTus6NphdrIsiudD Z6pUNRXqXnJ9+C4oWf5avrQgwjbsGR6kR26RS25kDOG3mM5tdipADeOGJPUjOIDjnwik hJuIm8/GPKEuqooZVFtQDE135K/JfYVBZ6ZT60FXadQWekVngDz/EkFumErv2RD05eTz ixu+rZYXi12cCSWa84HlhceZsJxfxDPvR8Yc5d1vT3iWAliAVjJHhVDq4WuBcZnNJMo3 NLhkE5qNdUeE1z0bZj9YLCjYxgEZEOvsj4LZIavwAnJ6DidRKmq5Sfp+3tCv0oRa7ljk /u/w== 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 i1si9777981pgc.229.2018.04.08.10.07.33; Sun, 08 Apr 2018 10:08:37 -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 S1752442AbeDHQC6 (ORCPT + 99 others); Sun, 8 Apr 2018 12:02:58 -0400 Received: from tn-76-7-174-50.sta.embarqhsd.net ([76.7.174.50]:56931 "EHLO animx.eu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751998AbeDHQC5 (ORCPT ); Sun, 8 Apr 2018 12:02:57 -0400 Received: from wakko by animx.eu.org with local (Exim 4.87 #3 (Debian Bug? What bug /\oo/\)) id 1f5CmM-0006R6-7o; Sun, 08 Apr 2018 12:02:54 -0400 Date: Sun, 8 Apr 2018 12:02:54 -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: <20180408160254.GA22869@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1ff8d234cc565ba9701ce31899fca5faa597e050.camel@wdc.com> 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 Bart Van Assche wrote: > On Sat, 2018-04-07 at 12:53 -0400, Wakko Warner wrote: > > Bart Van Assche wrote: > > > On Thu, 2018-04-05 at 22:06 -0400, Wakko Warner wrote: > > > > I know now why scsi_print_command isn't doing anything. cmd->cmnd is null. > > > > I added a dev_printk in scsi_print_command where the 2 if statements return. > > > > Logs: > > > > [ 29.866415] sr 3:0:0:0: cmd->cmnd is NULL > > > > > > That's something that should never happen. As one can see in > > > scsi_setup_scsi_cmnd() and scsi_setup_fs_cmnd() both functions initialize > > > that pointer. Since I have not yet been able to reproduce myself what you > > > reported, would it be possible for you to bisect this issue? You will need > > > to follow something like the following procedure (see also > > > https://git-scm.com/docs/git-bisect): > > > > After doing 3 successful compiles with good/bad, I got this error and was > > not able to compile any more kernels: > > CC scripts/mod/devicetable-offsets.s > > scripts/mod/empty.c:1:0: error: code model kernel does not support PIC mode > > /* empty file to figure out endianness / word size */ > > > > scripts/mod/devicetable-offsets.c:1:0: error: code model kernel does not support PIC mode > > #include > > > > scripts/Makefile.build:153: recipe for target 'scripts/mod/devicetable-offsets.s' failed > > > > I don't think it found the bad commit. > > 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. -- Microsoft has beaten Volkswagen's world record. Volkswagen only created 22 million bugs.