|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 3/6] add check to cpumask_of()
Just like any other function's CPU inputs, the one here shouldn't go
unchecked.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
--- 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);
}
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |