mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
tools/xenalyze: Actually handle case where number of ipi vectors exceeds static max
find_vec() is supposed to find the vector in the list if it exists, choose an empty slot if it doesn't exist, and return null if all slots are full. However, coverity noticed that although the callers of find_vec() handle the last condition, find_vec() itself didn't. Check to see if we actually found an empty slot before attempting to initialize it. CID 1306864 Signed-off-by: George Dunlap <george.dunlap@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
1065622448
commit
986d9fc3bb
1 file changed
+1
-1
@@ -3547,7 +3547,7 @@ struct outstanding_ipi *find_vec(struct vlapic_struct *vla, int vec)
|
||||
o = vla->outstanding.list + i;
|
||||
}
|
||||
|
||||
if(!o->valid) {
|
||||
if(o && !o->valid) {
|
||||
o->vec = vec;
|
||||
o->valid = 1;
|
||||
}
|
||||
|
||||