stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Long Li <longli@exchange.microsoft.com>
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	KY Srinivasan <kys@microsoft.com>,
	Bart Van Assche <Bart.VanAssche@sandisk.com>,
	Christoph Hellwig <hch@infradead.org>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Long Li <longli@microsoft.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH v2] scsi: zero per-cmd private driver data for each MQ I/O
Date: Thu, 18 May 2017 21:45:24 -0400	[thread overview]
Message-ID: <yq18tlt4o23.fsf@oracle.com> (raw)
In-Reply-To: <1495147205-28778-1-git-send-email-longli@exchange.microsoft.com> (Long Li's message of "Thu, 18 May 2017 15:40:05 -0700")


Long,

> In lower layer driver's (LLD) scsi_host_template, the driver may
> optionally ask SCSI to allocate its private driver memory for each
> command, by specifying cmd_size. This memory is allocated at the end
> of scsi_cmnd by SCSI.  Later when SCSI queues a command, the LLD can
> use scsi_cmd_priv to get to its private data.
>  
> Some LLD, e.g. hv_storvsc, doesn't clear its private data before
> use. In this case, the LLD may get to stale or uninitialized data in
> its private driver memory. This may result in unexpected driver and
> hardware behavior.
>
> Fix this problem by also zeroing the private driver memory before
> passing them to LLD.

Applied to 4.12/scsi-fixes. Thank you!

-- 
Martin K. Petersen	Oracle Linux Engineering

      reply	other threads:[~2017-05-19  1:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18 22:40 [PATCH v2] scsi: zero per-cmd private driver data for each MQ I/O Long Li
2017-05-19  1:45 ` Martin K. Petersen [this message]

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=yq18tlt4o23.fsf@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=Bart.VanAssche@sandisk.com \
    --cc=hch@infradead.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=longli@exchange.microsoft.com \
    --cc=longli@microsoft.com \
    --cc=stable@vger.kernel.org \
    --cc=sthemmin@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;
as well as URLs for NNTP newsgroup(s).