Blame SOURCES/0002-vhost-propagate-set-features-handling-error.patch

a6040a
From d7f0078e3a3d838b4ec6a87dca62771246e53db6 Mon Sep 17 00:00:00 2001
a6040a
From: Maxime Coquelin <maxime.coquelin@redhat.com>
a6040a
Date: Wed, 13 Dec 2017 09:51:07 +0100
a6040a
Subject: [PATCH 2/6] vhost: propagate set features handling error
a6040a
a6040a
Not propagating VHOST_USER_SET_FEATURES request handling
a6040a
error may result in unpredictable behavior, as host and
a6040a
guests features may no more be synchronized.
a6040a
a6040a
This patch fixes this by reporting the error to the upper
a6040a
layer, which would result in the device being destroyed
a6040a
and the connection with the master to be closed.
a6040a
a6040a
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
a6040a
Acked-by: Laszlo Ersek <lersek@redhat.com>
a6040a
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
a6040a
(cherry picked from commit 59fe5e17d9308b008ffa22ea250ddd363c84c3b5)
a6040a
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
a6040a
---
a6040a
 dpdk-17.11/lib/librte_vhost/vhost_user.c | 4 +++-
a6040a
 1 file changed, 3 insertions(+), 1 deletion(-)
a6040a
a6040a
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
a6040a
index 545dbcb2b..471b1612c 100644
a6040a
--- a/lib/librte_vhost/vhost_user.c
a6040a
+++ b/lib/librte_vhost/vhost_user.c
a6040a
@@ -1263,7 +1263,9 @@ vhost_user_msg_handler(int vid, int fd)
a6040a
 		send_vhost_reply(fd, &msg;;
a6040a
 		break;
a6040a
 	case VHOST_USER_SET_FEATURES:
a6040a
-		vhost_user_set_features(dev, msg.payload.u64);
a6040a
+		ret = vhost_user_set_features(dev, msg.payload.u64);
a6040a
+		if (ret)
a6040a
+			return -1;
a6040a
 		break;
a6040a
 
a6040a
 	case VHOST_USER_GET_PROTOCOL_FEATURES:
a6040a
-- 
a6040a
2.14.3
a6040a