Skip to content

Commit 9e506f7

Browse files
mitatorvalds
authored andcommitted
kernel/: fix BUG_ON checks for cpu notifier callbacks direct call
The commit 80b5184 ("kernel/: convert cpu notifier to return encapsulate errno value") changed the return value of cpu notifier callbacks. Those callbacks don't return NOTIFY_BAD on failures anymore. But there are a few callbacks which are called directly at init time and checking the return value. I forgot to change BUG_ON checking by the direct callers in the commit. Signed-off-by: Akinobu Mita <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 94b3dd0 commit 9e506f7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

kernel/softirq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ static __init int spawn_ksoftirqd(void)
850850
void *cpu = (void *)(long)smp_processor_id();
851851
int err = cpu_callback(&cpu_nfb, CPU_UP_PREPARE, cpu);
852852

853-
BUG_ON(err == NOTIFY_BAD);
853+
BUG_ON(err != NOTIFY_OK);
854854
cpu_callback(&cpu_nfb, CPU_ONLINE, cpu);
855855
register_cpu_notifier(&cpu_nfb);
856856
return 0;

kernel/timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1717,7 +1717,7 @@ void __init init_timers(void)
17171717

17181718
init_timer_stats();
17191719

1720-
BUG_ON(err == NOTIFY_BAD);
1720+
BUG_ON(err != NOTIFY_OK);
17211721
register_cpu_notifier(&timers_nb);
17221722
open_softirq(TIMER_SOFTIRQ, run_timer_softirq);
17231723
}

0 commit comments

Comments
 (0)