mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 11:22:26 +00:00
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 <cathy.zhang@intel.com>
This commit is contained in:
parent
347611b0c7
commit
c4309515c9
@ -573,7 +573,7 @@ impl<S: VhostUserBackend> VhostUserSlaveReqHandler for VhostUserHandler<S> {
|
||||
}
|
||||
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user