]> git.baikalelectronics.ru Git - kernel.git/commit
NVMe: Fix SG_IO status values
authorKeith Busch <keith.busch@intel.com>
Wed, 27 Aug 2014 19:55:39 +0000 (13:55 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 4 Nov 2014 20:17:09 +0000 (13:17 -0700)
commit07fa440f876bcc8c6132b83483f56c624415934c
treec4fd6fffb45ba42442ecc7bad1113972d422b4c0
parent79aea66bc7683fdd8a18e0443b86e213c2e1881b
NVMe: Fix SG_IO status values

We've only been setting the sg_io_hdr status values on SCSI commands
that require an nvme command to complete the translation. The fields
in the struct are output parameters, so we have to set them, otherwise
user space will see whatever was in memory from before. In the case of
compat SG_IO, this would reveal kernel memory. This fixes the issue by
initializing the sg_io_hdr with successful status.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Acked-by: Vishal Verma <vishal.l.verma@linux.intel.com>
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/nvme-scsi.c