From c4309515c9007be02e600f701eeda28891d3dbe8 Mon Sep 17 00:00:00 2001 From: Cathy Zhang Date: Tue, 24 Sep 2019 13:32:20 +0800 Subject: [PATCH] vhost-user-backend: Remove one checking from set_features The vhost-user protocol does not indicate set_features could not be issued more than once, the checking is not needed at all, and prevent communication between master and slave. Remove it to fix the issue. Signed-off-by: Cathy Zhang --- vhost_user_backend/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vhost_user_backend/src/lib.rs b/vhost_user_backend/src/lib.rs index f0f9957f9..d3d76af06 100644 --- a/vhost_user_backend/src/lib.rs +++ b/vhost_user_backend/src/lib.rs @@ -573,7 +573,7 @@ impl VhostUserSlaveReqHandler for VhostUserHandler { } fn set_features(&mut self, features: u64) -> VhostUserResult<()> { - if !self.owned || self.features_acked { + if !self.owned { return Err(VhostUserError::InvalidOperation); } else if (features & !self.backend.read().unwrap().features()) != 0 { return Err(VhostUserError::InvalidParam);