mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-03 20:15:45 +00:00
vhost_user_backend: remove ownership check in set_features()
set_features() fails with InvalidOperation if !self.owned. I don't see this as a requirement in the specification and, in fact, vm-virtio implementation for resetting the device calls SET_FEATURES just after RESET_OWNER. Signed-off-by: Sergio Lopez <slp@redhat.com>
This commit is contained in:
parent
5870452d25
commit
ceafd4cee7
@ -477,9 +477,7 @@ impl<S: VhostUserBackend> VhostUserSlaveReqHandler for VhostUserHandler<S> {
|
||||
}
|
||||
|
||||
fn set_features(&mut self, features: u64) -> VhostUserResult<()> {
|
||||
if !self.owned {
|
||||
return Err(VhostUserError::InvalidOperation);
|
||||
} else if (features & !self.backend.read().unwrap().features()) != 0 {
|
||||
if (features & !self.backend.read().unwrap().features()) != 0 {
|
||||
return Err(VhostUserError::InvalidParam);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user