OpenCloudOS-Kernel/drivers/nvme/host
Andy Lutomirski 9b47f77a68 nvme: Fix nvme_get/set_features() with a NULL result pointer
nvme_set_features() callers seem to expect that passing NULL as the
result pointer is acceptable.  Teach nvme_set_features() not to try to
write to the NULL address.

For symmetry, make the same change to nvme_get_features(), despite the
fact that all current callers pass a valid result pointer.

I assume that this bug hasn't been reported in practice because
the callers that pass NULL are all in the SCSI translation layer
and no one uses the relevant operations.

Cc: stable@vger.kernel.org
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
2016-08-24 08:11:10 -06:00
..
Kconfig nvme-rdma: add a NVMe over Fabrics RDMA host driver 2016-07-08 08:38:49 -06:00
Makefile nvme-rdma: add a NVMe over Fabrics RDMA host driver 2016-07-08 08:38:49 -06:00
core.c nvme: Fix nvme_get/set_features() with a NULL result pointer 2016-08-24 08:11:10 -06:00
fabrics.c nvme-fabrics: add-remove ctrl repeat fix 2016-07-12 08:32:19 -07:00
fabrics.h nvme-fabrics: Remove tl_retry_count 2016-07-12 08:31:11 -07:00
lightnvm.c block: get rid of bio_rw and READA 2016-07-20 17:37:01 -06:00
nvme.h nvme: Limit command retries 2016-07-12 16:20:31 -07:00
pci.c nvme: Suspend all queues before deletion 2016-08-11 09:35:57 -06:00
rdma.c nvme-rdma: Remove unused includes 2016-08-04 17:47:54 +03:00
scsi.c nvme: move chardev and sysfs interface to common code 2015-12-01 10:59:40 -07:00