Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753059AbdCHQBx (ORCPT ); Wed, 8 Mar 2017 11:01:53 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:41143 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750824AbdCHQBv (ORCPT ); Wed, 8 Mar 2017 11:01:51 -0500 Date: Wed, 8 Mar 2017 07:11:13 -0800 From: Christoph Hellwig To: Kashyap Desai Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Subject: Re: out of range LBA using sg_raw Message-ID: <20170308151113.GB27450@infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 350 Lines: 9 Hi Kashyap, for SG_IO passthrough requests we can't validate command validity for commands as the block layer treats them as opaque. The SCSI device implementation needs to handle incorrect parameter to be robust. For your fast path bypass the megaraid driver assumes part of the SCSI device implementation, so it will have to check for validity.