nvmf/vfio-user: only set S_IRUSR and S_IWUSR for mmapped BAR

Change-Id: Ic02089cd9ec49341b86d92377da734dc013d5cc7
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10335
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Changpeng Liu 2021-11-18 22:46:38 +08:00 committed by Tomasz Zawadzki
parent 8c6ab6ce3c
commit 8e38b9882f

View File

@ -2087,7 +2087,7 @@ nvmf_vfio_user_listen(struct spdk_nvmf_transport *transport,
goto out;
}
ret = open(path, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
ret = open(path, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
if (ret == -1) {
SPDK_ERRLOG("%s: failed to open device memory at %s: %s.\n",
endpoint_id(endpoint), path, spdk_strerror(errno));