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@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
Jan Beulich committed 2018-01-23 10:44:43 +01:00
1 parent c64bf2d2a6
commit e8bf5addc9
1 file changed
+3 -1
+3 -1
View File
@@ -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);
}
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.