projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c64bf2d
)
add check to cpumask_of()
author
Jan Beulich
<jbeulich@suse.com>
Tue, 23 Jan 2018 09:44:43 +0000
(10:44 +0100)
committer
Jan Beulich
<jbeulich@suse.com>
Tue, 23 Jan 2018 09:44:43 +0000
(10:44 +0100)
Just like any other function's CPU inputs, the one here shouldn't go
unchecked.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
xen/include/xen/cpumask.h
patch
|
blob
|
history
diff --git
a/xen/include/xen/cpumask.h
b/xen/include/xen/cpumask.h
index 3f340d619a63b9cbdd675a10a8254819a677a7a4..42340a098ee4f729d4b51a946b3562d1c3bb4b9c 100644
(file)
--- a/
xen/include/xen/cpumask.h
+++ b/
xen/include/xen/cpumask.h
@@
-304,7
+304,9
@@
extern const unsigned long
static inline const cpumask_t *cpumask_of(unsigned int cpu)
{
- const unsigned long *p = cpu_bit_bitmap[1 + cpu % BITS_PER_LONG];
+ const unsigned long *p = cpu_bit_bitmap[1 + cpumask_check(cpu) %
+ BITS_PER_LONG];
+
return (const cpumask_t *)(p - cpu / BITS_PER_LONG);
}