Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lightnvm: bad type conversion for nvme control bits

The NVMe I/O command control bits are 16 bytes, but is interpreted as
32 bytes in the lightnvm user I/O data path.

Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <matias@cnexlabs.com>
Signed-off-by: Jens Axboe <axboe@fb.com>

authored by

Javier González and committed by
Jens Axboe
e85292fe 7d1ef2f4

+1 -1
+1 -1
drivers/nvme/host/lightnvm.c
··· 754 754 c.common.cdw2[1] = cpu_to_le32(vcmd.cdw3); 755 755 /* cdw11-12 */ 756 756 c.ph_rw.length = cpu_to_le16(vcmd.nppas); 757 - c.ph_rw.control = cpu_to_le32(vcmd.control); 757 + c.ph_rw.control = cpu_to_le16(vcmd.control); 758 758 c.common.cdw10[3] = cpu_to_le32(vcmd.cdw13); 759 759 c.common.cdw10[4] = cpu_to_le32(vcmd.cdw14); 760 760 c.common.cdw10[5] = cpu_to_le32(vcmd.cdw15);