From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754028AbdBNO3T (ORCPT ); Tue, 14 Feb 2017 09:29:19 -0500 Received: from verein.lst.de ([213.95.11.211]:50617 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753908AbdBNO2j (ORCPT ); Tue, 14 Feb 2017 09:28:39 -0500 Date: Tue, 14 Feb 2017 15:28:37 +0100 From: "hch@lst.de" To: Dexuan Cui Cc: "hch@lst.de" , Jens Axboe , Bart Van Assche , "hare@suse.com" , "hare@suse.de" , "Martin K. Petersen" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "jth@kernel.org" , Nick Meier , "Alex Ng (LIS)" , Long Li , "Adrian Suhov (Cloudbase Solutions SRL)" , "Chris Valean (Cloudbase Solutions SRL)" Subject: Re: Boot regression (was "Re: [PATCH] genhd: Do not hold event lock when scheduling workqueue elements") Message-ID: <20170214142837.GB20706@lst.de> References: <9199d528-f220-5b77-d657-c510ca210067@kernel.dk> <20170208180314.GA17838@lst.de> <20170209130800.GA12057@lst.de> <20170214134736.GA19620@lst.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="BXVAT5kNtrzKuDFl" 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 --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Ok, thanks for testing. Can you try the patch below? It fixes a clear problem which was partially papered over before the commit you bisected to, although it can't explain why blk-mq still works. --BXVAT5kNtrzKuDFl Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="0001-scsi-always-zero-sshdr-in-scsi_normalize_sense.patch" >>From e4a66856fa2d92c0298000de658365f31bea60cd Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 14 Feb 2017 15:08:39 +0100 Subject: scsi: always zero sshdr in scsi_normalize_sense This gives us a clear state even if a command didn't return sense data. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/scsi_common.c b/drivers/scsi/scsi_common.c index b1383a71400e..a75673bb82b3 100644 --- a/drivers/scsi/scsi_common.c +++ b/drivers/scsi/scsi_common.c @@ -137,11 +137,11 @@ EXPORT_SYMBOL(int_to_scsilun); bool scsi_normalize_sense(const u8 *sense_buffer, int sb_len, struct scsi_sense_hdr *sshdr) { + memset(sshdr, 0, sizeof(struct scsi_sense_hdr)); + if (!sense_buffer || !sb_len) return false; - memset(sshdr, 0, sizeof(struct scsi_sense_hdr)); - sshdr->response_code = (sense_buffer[0] & 0x7f); if (!scsi_sense_valid(sshdr)) -- 2.11.0 --BXVAT5kNtrzKuDFl--