Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754952AbcLXNRd (ORCPT ); Sat, 24 Dec 2016 08:17:33 -0500 Received: from mx2.suse.de ([195.135.220.15]:60769 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752107AbcLXNRa (ORCPT ); Sat, 24 Dec 2016 08:17:30 -0500 Subject: Re: [4.10, panic, regression] iscsi: null pointer deref at iscsi_tcp_segment_done+0x20d/0x2e0 To: Christoph Hellwig , Linus Torvalds References: <20161222001303.nvrtm22szn3hgxar@straylight.hirudinean.org> <20161222051322.GF4758@dastard> <20161222065012.GI4758@dastard> <20161222185030.so4btkuzzkih3owz@straylight.hirudinean.org> <20161223000356.dxwkgsei32w7hc4f@straylight.hirudinean.org> <20161223100014.GA29467@lst.de> <20161224100756.GA16741@lst.de> Cc: Chris Leech , Ming Lei , Dave Chinner , Johannes Weiner , Linux Kernel Mailing List , Lee Duncan , open-iscsi@googlegroups.com, Linux SCSI List , linux-block , Jens Axboe , "Michael S. Tsirkin" From: Hannes Reinecke Message-ID: Date: Sat, 24 Dec 2016 14:17:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161224100756.GA16741@lst.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1511 Lines: 36 On 12/24/2016 11:07 AM, Christoph Hellwig wrote: > On Fri, Dec 23, 2016 at 11:42:45AM -0800, Linus Torvalds wrote: >> Ugh. This patch is nasty. > > It's the same SCSI has done for ages - except that is uses a separate > kmalloc for the sense buffer. > >> I think we should just fix blk_execute_rq() instead. > > As you found out below it's not just blk_execute_rq, it's the whole > architecture of the BLOCK_PC code, which expects a caller provided > sense buffer. But with the way blk-mq allocates request structures > we can actually fix it, but I first need to extent the way it allows > drivers to allocate private data to the old request code. I've > actually already implemented that for SCSI long time ago, and have > started to life it to the block layer. > Would be cool to have a generic sense buffer. I always found it slightly odd, pretending that 'struct request' is protocol-agnostic and refusing to add a sense data pointer, but at the same time having a field 'sense_len' (which gives the length of what exactly?). Christoph, do you have a pointer to your patchset? Not that I'll be able to do any meaningful work until next year, but having a look would be nice. Just to get a feeling where you want to head to; I might be able to work on this start of January. Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: J. Hawn, J. Guild, F. Imend?rffer, HRB 16746 (AG N?rnberg)