mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-26 15:32:30 +00:00
runtime-rs: bugfix incorrect use of refcount before vfio attach
When there's a pod with multiple containers, there may be case that attach point more than 2, we should not return Err in that case when we are doing attach ops, but just return Ok. Fixes: #8738 Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
This commit is contained in:
parent
aa9cd232cd
commit
548f252bc4
@ -456,7 +456,13 @@ impl Device for VfioDevice {
|
||||
.await
|
||||
.context("failed to increase attach count")?
|
||||
{
|
||||
return Err(anyhow!("attach count increased failed as some reason."));
|
||||
warn!(
|
||||
sl!(),
|
||||
"The device {:?} is not allowed to be attached more than one times.",
|
||||
self.device_id
|
||||
);
|
||||
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
// do add device for vfio deivce
|
||||
|
Loading…
Reference in New Issue
Block a user