From 87653cd9228021dc474cd21fbe3476f82a4d6c12 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Wed, 28 Sep 2016 14:29:52 +0200 Subject: fix fix-vhost-user-socket-permission.patch for 16.07 Since preparation and actual creation of sockets was split to support client/server sockets the call to fix up the sockets permissions has to be moved until after the fd is created. Otherwise the chmod/chown will fail with: EAL: vhost-user socket cannot set permissions to 0666 (Unknown error -1). EAL: vhost-user socket unable to set ownership to libvirt-qemu:kvm (Unknown error -1). Change-Id: Ia91eda2f5b217a5a9aa6c2f5ddf2c882048e42b8 Signed-off-by: Christian Ehrhardt --- debian/patches/fix-vhost-user-socket-permission.patch | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'debian/patches') diff --git a/debian/patches/fix-vhost-user-socket-permission.patch b/debian/patches/fix-vhost-user-socket-permission.patch index ab3d6322..e75cbc25 100644 --- a/debian/patches/fix-vhost-user-socket-permission.patch +++ b/debian/patches/fix-vhost-user-socket-permission.patch @@ -27,7 +27,7 @@ Fixes LP: #1546565 Forwarded: yes Author: Christian Ehrhardt -Last-Update: 2016-07-25 +Last-Update: 2016-09-28 diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst index 7712bd2..28776b9 100644 @@ -361,11 +361,11 @@ index b35594d..dbdb8ad 100644 #define MAX_VIRTIO_BACKLOG 128 static void vhost_user_server_new_connection(int fd, void *data, int *remove); -@@ -682,6 +684,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags) - if (!vsocket) - goto out; - memset(vsocket, 0, sizeof(struct vhost_user_socket)); +@@ -699,6 +701,7 @@ + vsocket->is_server = true; + ret = vhost_user_create_server(vsocket); + } + rte_eal_set_socket_permissions(path); - vsocket->path = strdup(path); - vsocket->connfd = -1; - + if (ret < 0) { + free(vsocket->path); + free(vsocket); -- cgit 1.2.3-korg