From mboxrd@z Thu Jan 1 00:00:00 1970 From: hch@lst.de (Christoph Hellwig) Date: Fri, 26 Aug 2016 16:35:57 +0200 Subject: [PATCH] nvme: Fix nvme_get/set_features() with a NULL result pointer In-Reply-To: References: <20160825073810.GA18622@lst.de> Message-ID: <20160826143557.GA21788@lst.de> On Fri, Aug 26, 2016@07:31:33AM -0700, Andy Lutomirski wrote: > - Consider *deleting* the SCSI translation layer's power saving code. > It looks almost entirely bogus to me. It has an off-by-one in its > NPSS handling, it hardcodes power state indices which is total BS, it > ignores the distinction between operational and non-operational states > (which I think matters for non-APST usage). It also seems likely to > be that it's never been used, since it's one of the formerly > crashy-looking set_features users. Please go ahead and send a patch to delete it. Adding the whole SCSI layer was a mistake to start with, and it's always been horribly buggy. Until I started running the libiscsi testsuite even fairly normal I/O commands were a sure way to crash it, and crazy things like PM are almost guaranteed to a) not actually be used by real application and b) horrible buggy (as you've already noticed) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753980AbcHZOqj (ORCPT ); Fri, 26 Aug 2016 10:46:39 -0400 Received: from verein.lst.de ([213.95.11.211]:48750 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752014AbcHZOqi (ORCPT ); Fri, 26 Aug 2016 10:46:38 -0400 Date: Fri, 26 Aug 2016 16:35:57 +0200 From: Christoph Hellwig To: Andy Lutomirski Cc: Jens Axboe , linux-nvme@lists.infradead.org, Keith Busch , Christoph Hellwig , stable , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] nvme: Fix nvme_get/set_features() with a NULL result pointer Message-ID: <20160826143557.GA21788@lst.de> References: <20160825073810.GA18622@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Fri, Aug 26, 2016 at 07:31:33AM -0700, Andy Lutomirski wrote: > - Consider *deleting* the SCSI translation layer's power saving code. > It looks almost entirely bogus to me. It has an off-by-one in its > NPSS handling, it hardcodes power state indices which is total BS, it > ignores the distinction between operational and non-operational states > (which I think matters for non-APST usage). It also seems likely to > be that it's never been used, since it's one of the formerly > crashy-looking set_features users. Please go ahead and send a patch to delete it. Adding the whole SCSI layer was a mistake to start with, and it's always been horribly buggy. Until I started running the libiscsi testsuite even fairly normal I/O commands were a sure way to crash it, and crazy things like PM are almost guaranteed to a) not actually be used by real application and b) horrible buggy (as you've already noticed)