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:
George Dunlap authored and Konrad Rzeszutek Wilk committed 2016-02-29 11:12:53 -05:00
1 parent 1065622448
commit 986d9fc3bb
1 file changed
+1 -1
+1 -1
View File
@@ -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;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.