]> git.ipfire.org Git - people/ms/linux.git/commit
nvmet: fix dsm failure when payload does not match sgl descriptor
authorSagi Grimberg <sagi@grimberg.me>
Mon, 27 Jan 2020 07:23:28 +0000 (23:23 -0800)
committerKeith Busch <kbusch@kernel.org>
Mon, 3 Feb 2020 18:00:24 +0000 (03:00 +0900)
commitb716e6889c95f64ba32af492461f6cc9341f3f05
treef51aff28a48be1f1d92058d57674828f74b539d8
parent4ac76436a6d07dec1c3c766f234aa787a16e8f65
nvmet: fix dsm failure when payload does not match sgl descriptor

The host is allowed to pass the controller an sgl describing a buffer
that is larger than the dsm payload itself, allow it when executing
dsm.

Reported-by: Dakshaja Uppalapati <dakshaja@chelsio.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>,
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/core.c
drivers/nvme/target/io-cmd-bdev.c
drivers/nvme/target/io-cmd-file.c
drivers/nvme/target/nvmet.h