mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-06-20 11:22:19 +08:00
fix(host): out of range when list GPU devices (#15080)
This commit is contained in:
@@ -480,6 +480,10 @@ func (g *IOMMUGroup) ListDevices(groupNum, selfAddr, vendorId string) []*PCIDevi
|
||||
if addr == selfAddr {
|
||||
continue
|
||||
}
|
||||
if len(addr) < 5 {
|
||||
log.Warningf("Invalid addr %q of %q iommu_group[%s], skip it", addr, selfAddr, groupNum)
|
||||
continue
|
||||
}
|
||||
dev, _ := detectPCIDevByAddrWithoutIOMMUGroup(addr[5:])
|
||||
if dev != nil {
|
||||
if dev.VendorId == vendorId {
|
||||
|
||||
Reference in New Issue
Block a user