summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinwoo Im <minwoo.im.dev@gmail.com>2019-04-11 18:18:31 +0300
committerChristoph Hellwig <hch@lst.de>2019-05-01 16:17:27 +0300
commita2faf94e57c5237a9cad31f63eeaf2412ed0e951 (patch)
tree0c95af51c112b79dc8cfb0c64a513dc4a5a511a7
parenta97234e1ff1ec9d5a41c6adff5632c61639dee6a (diff)
downloadlinux-a2faf94e57c5237a9cad31f63eeaf2412ed0e951.tar.xz
nvme-fabrics: check more command sizes
struct common_command provides a common structure for NVMe-oF command format. It also needs to be checked for unintended size growth. Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--drivers/nvme/host/fabrics.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index d4cb826f58ff..592d1e61ef7e 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -1188,6 +1188,7 @@ static void __exit nvmf_exit(void)
class_destroy(nvmf_class);
nvmf_host_put(nvmf_default_host);
+ BUILD_BUG_ON(sizeof(struct nvmf_common_command) != 64);
BUILD_BUG_ON(sizeof(struct nvmf_connect_command) != 64);
BUILD_BUG_ON(sizeof(struct nvmf_property_get_command) != 64);
BUILD_BUG_ON(sizeof(struct nvmf_property_set_command) != 64);