diff options
author | Long Li <longli@microsoft.com> | 2017-05-18 15:40:05 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-05-18 21:44:49 -0400 |
commit | 1bad6c4a57efda0d5f5bf8a2403b21b1ed24875c (patch) | |
tree | e84b5bf13b77b7fae12e282bdb12802ce55e2d79 /drivers/regulator/rc5t583-regulator.c | |
parent | a351e40b6de550049423a26f7ded7b639e363d89 (diff) | |
download | blackbird-op-linux-1bad6c4a57efda0d5f5bf8a2403b21b1ed24875c.tar.gz blackbird-op-linux-1bad6c4a57efda0d5f5bf8a2403b21b1ed24875c.zip |
scsi: zero per-cmd private driver data for each MQ I/O
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.
Signed-off-by: Long Li <longli@microsoft.com>
Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com>
Reviewed-by: KY Srinivasan <kys@microsoft.com>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
CC: <stable@vger.kernel.org> # 4.11+
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/regulator/rc5t583-regulator.c')
0 files changed, 0 insertions, 0 deletions