Skip to content

Commit fbd44a6

Browse files
KAGA-KOKOIngo Molnar
authored andcommitted
tick: Use zalloc_cpumask_var for allocating offstack cpumasks
commit b352bc1 (tick: Convert broadcast cpu bitmaps to cpumask_var_t) broke CONFIG_CPUMASK_OFFSTACK in a very subtle way. Instead of allocating the cpumasks with zalloc_cpumask_var it uses alloc_cpumask_var, so we can get random data there, which of course confuses the logic completely and causes random failures. Reported-and-tested-by: Dave Jones <[email protected]> Reported-and-tested-by: Yinghai Lu <[email protected]> Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1305032015060.2990@ionos Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent ce85722 commit fbd44a6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

kernel/time/tick-broadcast.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -785,11 +785,11 @@ bool tick_broadcast_oneshot_available(void)
785785

786786
void __init tick_broadcast_init(void)
787787
{
788-
alloc_cpumask_var(&tick_broadcast_mask, GFP_NOWAIT);
789-
alloc_cpumask_var(&tmpmask, GFP_NOWAIT);
788+
zalloc_cpumask_var(&tick_broadcast_mask, GFP_NOWAIT);
789+
zalloc_cpumask_var(&tmpmask, GFP_NOWAIT);
790790
#ifdef CONFIG_TICK_ONESHOT
791-
alloc_cpumask_var(&tick_broadcast_oneshot_mask, GFP_NOWAIT);
792-
alloc_cpumask_var(&tick_broadcast_pending_mask, GFP_NOWAIT);
793-
alloc_cpumask_var(&tick_broadcast_force_mask, GFP_NOWAIT);
791+
zalloc_cpumask_var(&tick_broadcast_oneshot_mask, GFP_NOWAIT);
792+
zalloc_cpumask_var(&tick_broadcast_pending_mask, GFP_NOWAIT);
793+
zalloc_cpumask_var(&tick_broadcast_force_mask, GFP_NOWAIT);
794794
#endif
795795
}

0 commit comments

Comments
 (0)