From 084db9898aa4bcc3d1bd25576d74dd7bea5f8637 Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Tue, 23 Nov 2021 17:56:05 +0800 Subject: [PATCH] nvmf/vfio-user: use stack variable for sparse mmap libvfio-user will save a copy inside the library. Change-Id: If7bb052b03fb92e46abe50fa945b812d149ef01d Signed-off-by: Changpeng Liu Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10363 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Aleksey Marchuk Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- lib/nvmf/vfio_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nvmf/vfio_user.c b/lib/nvmf/vfio_user.c index 15c85e055..b8aaacde7 100644 --- a/lib/nvmf/vfio_user.c +++ b/lib/nvmf/vfio_user.c @@ -1866,7 +1866,7 @@ vfio_user_dev_info_fill(struct nvmf_vfio_user_transport *vu_transport, .mpba = {.pbir = 0x5, .pbao = 0x0} }; - static struct iovec sparse_mmap[] = { + struct iovec sparse_mmap[] = { { .iov_base = (void *)NVMF_VFIO_USER_DOORBELLS_OFFSET, .iov_len = NVMF_VFIO_USER_DOORBELLS_SIZE,