public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Christoph Hellwig <hch@lst.de>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Dexuan Cui <decui@microsoft.com>, Jens Axboe <axboe@kernel.dk>,
	Long Li <longli@microsoft.com>,
	Josh Poulson <jopoulso@microsoft.com>,
	v-adsuho@microsoft.com
Cc: linux-scsi@vger.kernel.org
Subject: Re: SCSI regression in 4.11
Date: Mon, 27 Feb 2017 17:19:31 -0800	[thread overview]
Message-ID: <20170227171931.30b9f619@xeon-e3> (raw)
In-Reply-To: <20170227152955.1362aabb@xeon-e3>

On Mon, 27 Feb 2017 15:30:30 -0800
Stephen Hemminger <stephen@networkplumber.org> wrote:

> Something in SCSI in 4.11 broke booting on Hyper-V Generation 2 VM with 8 VCPU and 4G of memory.
> Both Linus's current tree (4.11 pre-rc1) and linux-next fail in a similar manner. It looks like some error
> in SCSI device detection because there is only a single device.
> 
> The offending commit causing the regression is:
> 
> $ git bisect bad
> e9c787e65c0c36529745be47d490d998b4b6e589 is the first bad commit
> commit e9c787e65c0c36529745be47d490d998b4b6e589
> Author: Christoph Hellwig <hch@lst.de>
> Date:   Mon Jan 2 21:55:26 2017 +0300
> 
>     scsi: allocate scsi_cmnd structures as part of struct request
>     
>     Rely on the new block layer functionality to allocate additional driver
>     specific data behind struct request instead of implementing it in SCSI
>     itѕelf.
>     
>     Signed-off-by: Christoph Hellwig <hch@lst.de>
>     Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
>     Reviewed-by: Hannes Reinecke <hare@suse.com>
>     Signed-off-by: Jens Axboe <axboe@fb.com>
> 
> :040000 040000 6ff016fcdae227efeb19c1c301b17ccd7ea35da6 70d79f99d9b79ecf4dccbe067fc697219f5c78da M	drivers
> :040000 040000 a672ff52df8b2c211b3f98cae4a88d8a96ccde0b 1aaaed7de0994f597c7f8290c722a0b4a7789429 M	include
> 
> I checked and tree is current and up to date and includes 
> commit ee5242360424b9b967454e9183767323d10cf985
> Author: Christoph Hellwig <hch@lst.de>
> Date:   Tue Feb 21 10:04:55 2017 +0100
> 
>     scsi: zero per-cmd driver data before each I/O
> 
> Kernel config is attached. It started with Ubuntu config, but then did localmodconfig and pruned
> out unnecessary stuff.
> 

This problem I am seeing looks like the one addressed by:

Fixes: ee5242360424 ("scsi: zero per-cmd driver data before each I/O")

but that is already in linux-next.

Noticed another place where memset(of the data was being done not the extra bits.
Tried this, but didn't fix it either...


diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index ba2286652ff6..7e0463e78ff4 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1850,7 +1850,7 @@ static int scsi_mq_prep_fn(struct request *req)
 
 	/* zero out the cmd, except for the embedded scsi_request */
 	memset((char *)cmd + sizeof(cmd->req), 0,
-		sizeof(*cmd) - sizeof(cmd->req));
+		sizeof(*cmd) - sizeof(cmd->req) + sdev->host->hostt->cmd_size);
 
 	req->special = cmd;
 

  reply	other threads:[~2017-02-28  1:20 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27 23:30 SCSI regression in 4.11 Stephen Hemminger
2017-02-28  1:19 ` Stephen Hemminger [this message]
2017-02-28  2:16   ` Jens Axboe
2017-02-28 14:08   ` Christoph Hellwig
2017-02-28 15:32     ` Jens Axboe
2017-02-28 17:06       ` James Bottomley
2017-02-28 17:16         ` Stephen Hemminger
2017-02-28 17:31           ` Jens Axboe
2017-02-28 18:41         ` Stephen Hemminger
2017-02-28 19:10           ` James Bottomley
2017-02-28 18:57         ` Stephen Hemminger
2017-02-28 23:48           ` James Bottomley
2017-03-01  1:25             ` Stephen Hemminger
2017-03-01  6:20               ` James Bottomley
2017-03-01  6:48                 ` Stephen Hemminger
2017-03-01 15:50                   ` Christoph Hellwig
2017-03-01 15:54                     ` Stephen Hemminger
2017-03-02  0:01                       ` Christoph Hellwig
2017-03-02  0:56                         ` Christoph Hellwig
2017-03-02  1:40                           ` Stephen Hemminger
2017-03-02 13:25                             ` Hannes Reinecke
2017-03-02 17:48                               ` Stephen Hemminger
2017-03-02 18:23                               ` Stephen Hemminger
2017-03-02 18:36                                 ` James Bottomley
2017-03-02 19:05                                   ` Stephen Hemminger
2017-03-02 19:18                                     ` James Bottomley
2017-03-03 22:29                                       ` Stephen Hemminger
2017-03-04  0:50                                       ` [RFC] hv_storvsc: error handling Stephen Hemminger
2017-03-04 11:55                                         ` Hannes Reinecke
2017-03-04 21:03                                         ` KY Srinivasan
2017-03-04 21:36                                           ` James Bottomley
2017-03-04 21:39                                             ` KY Srinivasan
2017-03-04 23:55                                               ` KY Srinivasan
2017-03-06 16:36                                           ` Stephen Hemminger
2017-03-06 17:48                                             ` KY Srinivasan
2017-03-06 17:57                                               ` Stephen Hemminger
2017-03-07  5:06                                               ` Christoph Hellwig
2017-03-07  6:08                                                 ` KY Srinivasan
2017-03-02  0:57                         ` SCSI regression in 4.11 Stephen Hemminger
2017-03-01 16:13                     ` Stephen Hemminger
2017-03-01 18:48                 ` Stephen Hemminger
2017-03-01 18:57                   ` James Bottomley
2017-03-01 19:20                     ` James Bottomley
2017-03-01 19:39                       ` Stephen Hemminger
2017-03-01 21:27                       ` Stephen Hemminger
2017-03-01 23:09                         ` James Bottomley
2017-03-01 23:39                           ` Stephen Hemminger
2017-03-01 19:00                   ` Linus Torvalds
2017-02-28 17:33     ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170227171931.30b9f619@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=axboe@kernel.dk \
    --cc=decui@microsoft.com \
    --cc=hch@lst.de \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=jopoulso@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=martin.petersen@oracle.com \
    --cc=torvalds@linux-foundation.org \
    --cc=v-adsuho@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox