Received: by 10.192.165.156 with SMTP id m28csp1353793imm; Wed, 11 Apr 2018 17:57:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/UeaLqZi4evlHxnZHvGcZdnLMdgtmVtQws7GZ1h99fsXfxwFIizwnlSUEuE0UlIpJ0JR+V X-Received: by 10.99.140.77 with SMTP id q13mr5050354pgn.44.1523494621272; Wed, 11 Apr 2018 17:57:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523494621; cv=none; d=google.com; s=arc-20160816; b=drufvltpVWPNuhiH1roTSFNn26Gg2WmsWfVnimUCeaYT/QU8zERc171BtrrlsXLg6E Q47j5CU9MJEUvABJyshZVdk6FxUJTLvX39JKoHjTtQCdGgtvGOd07HLK2AFPeTBqgMdu JF2Ic05EcRDL+a816/kKsbTBb50Qk8xwduXAfF7oxdwq5KqDySh1Cd+7zVNuIWi0PwB/ hMC8A46FwNnX1DPoO2W5/KepowCiWnDHbOMOg7ql7zgVM15yPinC+6ZEif2rT6xHBFfn 2pbh1YGuyl/wDiTz8k3/jEQIOshj5KOFECojU98OUj/nLBm975Yn+bBE3B2eUheMJENs 8QaQ== 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=hIekYSdlj0F6LDOJ5Zj6QegfC+4HsETcg0V4nr5EJak=; b=E2Ypf23Z5B0YdEhJ+7B17IA3O1sYgua6vFZGTphMHxJasF4qa87gaX3Qtbj6W7wHAW QkTe0DrmetKalTHfly5ywRXRs99+5vbxRdyxeSWtOfNh04DGEO7e1szGNTwvtHthL6v4 CFNewVOAt47BAZs2f16gQ4HKDcOks3knvRmeYF8e+tzireGfuA+kwgABXva6r9h7C04H Fi5F/WGzCXcwxKwMUbMT2x6Z9bgzWysPRibiSBLXljfimIjj/ajhflci04tPtSRnN4QV /GiTdnQjSdoIx5PhfGlBrOSuhHQY9N+Q/N2KecrX8oCWf94SG5WWv2wIWuuH2os2Gw/X gYkA== 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 i1si1456693pgv.591.2018.04.11.17.56.24; Wed, 11 Apr 2018 17:57:01 -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 S1753080AbeDLAw3 (ORCPT + 99 others); Wed, 11 Apr 2018 20:52:29 -0400 Received: from tn-76-7-174-50.sta.embarqhsd.net ([76.7.174.50]:57649 "EHLO animx.eu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753060AbeDLAw1 (ORCPT ); Wed, 11 Apr 2018 20:52:27 -0400 Received: from wakko by animx.eu.org with local (Exim 4.87 #3 (Debian Bug? What bug /\oo/\)) id 1f6QTK-0003HI-Tc; Wed, 11 Apr 2018 20:52:18 -0400 Date: Wed, 11 Apr 2018 20:52:18 -0400 From: Wakko Warner To: Ming Lei Cc: Bart Van Assche , "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: <20180412005218.GA12237@animx.eu.org> References: <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> <20180409233436.GC6450@ming.t460p> <20180411004525.GA9107@animx.eu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180411004525.GA9107@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: > Ming Lei wrote: > > Sure, thanks for your sharing. > > > > Wakko, could you test the following patch and see if there is any > > difference? > > > > -- > > diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c > > index 0d99b242e82e..6147178f1f37 100644 > > --- a/drivers/target/target_core_pscsi.c > > +++ b/drivers/target/target_core_pscsi.c > > @@ -888,7 +888,7 @@ pscsi_map_sg(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, > > if (len > 0 && data_len > 0) { > > bytes = min_t(unsigned int, len, PAGE_SIZE - off); > > bytes = min(bytes, data_len); > > - > > + new_bio: > > if (!bio) { > > nr_vecs = min_t(int, BIO_MAX_PAGES, nr_pages); > > nr_pages -= nr_vecs; > > @@ -931,6 +931,7 @@ pscsi_map_sg(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, > > * be allocated with pscsi_get_bio() above. > > */ > > bio = NULL; > > + goto new_bio; > > } > > > > data_len -= bytes; > > Sorry for the delay. I reverted my change, added this one. I didn't > reboot, I just unloaded and loaded this one. > Note: /dev/sr1 as seen from the initiator is /dev/sr0 (physical disc) on the > target. > > Doesn't crash, however on the initiator I see this: > [9273849.707777] ISO 9660 Extensions: RRIP_1991A > [9273863.359718] scsi_io_completion: 13 callbacks suppressed > [9273863.359788] sr 26:0:0:0: [sr1] tag#1 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08 > [9273863.359909] sr 26:0:0:0: [sr1] tag#1 Sense Key : 0x2 [current] > [9273863.359974] sr 26:0:0:0: [sr1] tag#1 ASC=0x8 ASCQ=0x0 > [9273863.360036] sr 26:0:0:0: [sr1] tag#1 CDB: opcode=0x28 28 00 00 22 f6 96 00 00 80 00 > [9273863.360116] blk_update_request: 13 callbacks suppressed > [9273863.360177] blk_update_request: I/O error, dev sr1, sector 9165400 > [9273875.864648] sr 26:0:0:0: [sr1] tag#1 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08 > [9273875.864738] sr 26:0:0:0: [sr1] tag#1 Sense Key : 0x2 [current] > [9273875.864801] sr 26:0:0:0: [sr1] tag#1 ASC=0x8 ASCQ=0x0 > [9273875.864890] sr 26:0:0:0: [sr1] tag#1 CDB: opcode=0x28 28 00 00 22 f7 16 00 00 80 00 > [9273875.864971] blk_update_request: I/O error, dev sr1, sector 9165912 Just FYI: The jobs that I do that uses the disc over iscsi didn't cause any kernel messages on either system (except for the informational when the disc was mounted) I have a dumb question though. Could the label be placed just after the 'if' statement instead of before it? bio is set to null and the 'if' statement checks if it's null, which it always would be after the goto. -- Microsoft has beaten Volkswagen's world record. Volkswagen only created 22 million bugs.