From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752684AbdHKIiM (ORCPT ); Fri, 11 Aug 2017 04:38:12 -0400 Received: from verein.lst.de ([213.95.11.211]:37590 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752553AbdHKIiK (ORCPT ); Fri, 11 Aug 2017 04:38:10 -0400 Date: Fri, 11 Aug 2017 10:38:08 +0200 From: Christoph Hellwig To: Benjamin Block Cc: Christoph Hellwig , "James E . J . Bottomley" , "Martin K . Petersen" , Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Johannes Thumshirn , Steffen Maier , open-iscsi@googlegroups.com Subject: Re: [RFC PATCH 1/6] bsg: fix kernel panic resulting from missing allocation of a reply-buffer Message-ID: <20170811083808.GA5497@lst.de> References: <9e67ce3fc2f3cd42e9e05b2753b00d6676f46ee1.1502120928.git.bblock@linux.vnet.ibm.com> <20170810093217.GL24539@lst.de> <20170810221038.GA918@bblock-ThinkPad-W530> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170810221038.GA918@bblock-ThinkPad-W530> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org My point was that we now gurantee that that the sense data is not a stack pointer an a driver can DMA to it. Now for BSG the sense data is "just" abused as reply, but the point still stands - we don't want to pass a possible stack pointer to drivers in a data buffer because we want to allow DMA to it. That being said with your patch 4 that becomes a moot point as we'll now always dynamically allocate it. So maybe just reorder that to go first and we should be fine.