From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 25 Jan 2012 14:39:37 -0800 From: Greg KH To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, linux-scsi@vger.kernel.org, Jens Axboe , James Bottomley Subject: Re: [v2] Re: [091/129] block: fail SCSI passthrough ioctls on partition devices Message-ID: <20120125223937.GA12516@kroah.com> References: <20120124023932.023409422@clark.kroah.org> <1327423431-13965-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1327423431-13965-1-git-send-email-pbonzini@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: On Tue, Jan 24, 2012 at 05:43:50PM +0100, Paolo Bonzini wrote: > > You need to return -ENOTTY from scsi_verify_blk_ioctl and -ENOIOCTLCMD from > > sd_compat_ioctl, because -ENOIOCTLCMD will not be handled correctly by > > block/ioctl.c. This would break BLKROSET and BLKFLSBUF done by non-root > > but with the appropriate capabilities. > > > > Fixed patch follows. If you prefer that I send an interdiff, let me know. Wait, why do you want the stable trees to diverge from what is in Linus's tree with regards to the error codes being returned? That doesn't seem safe, or sane. So for now, I'm going to follow what is in Linus's tree. If you need/want the error codes to be different, then shouldn't it also be done there as well? thanks, greg k-h