Commit 10e6676
x86/smpboot: Unbreak CPU0 hotplug
A hang on CPU0 onlining after a preceding offlining is observed. Trace
shows that CPU0 is stuck in check_tsc_sync_target() waiting for source
CPU to run check_tsc_sync_source() but this never happens. Source CPU,
in its turn, is stuck on synchronize_sched() which is called from
native_cpu_up() -> do_boot_cpu() -> unregister_nmi_handler().
So it's a classic ABBA deadlock, due to the use of synchronize_sched() in
unregister_nmi_handler().
Fix the bug by moving unregister_nmi_handler() from do_boot_cpu() to
native_cpu_up() after cpu onlining is done.
Signed-off-by: Vitaly Kuznetsov <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>1 parent e93c173 commit 10e6676
1 file changed
+17
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
971 | 971 | | |
972 | 972 | | |
973 | 973 | | |
974 | | - | |
| 974 | + | |
| 975 | + | |
975 | 976 | | |
976 | 977 | | |
977 | 978 | | |
978 | 979 | | |
979 | 980 | | |
980 | 981 | | |
981 | 982 | | |
982 | | - | |
983 | 983 | | |
984 | 984 | | |
985 | 985 | | |
| |||
1035 | 1035 | | |
1036 | 1036 | | |
1037 | 1037 | | |
1038 | | - | |
| 1038 | + | |
1039 | 1039 | | |
1040 | 1040 | | |
1041 | 1041 | | |
| |||
1080 | 1080 | | |
1081 | 1081 | | |
1082 | 1082 | | |
1083 | | - | |
1084 | | - | |
1085 | | - | |
1086 | | - | |
1087 | | - | |
1088 | | - | |
1089 | 1083 | | |
1090 | 1084 | | |
1091 | 1085 | | |
1092 | 1086 | | |
1093 | 1087 | | |
1094 | 1088 | | |
1095 | 1089 | | |
| 1090 | + | |
1096 | 1091 | | |
1097 | | - | |
| 1092 | + | |
1098 | 1093 | | |
1099 | 1094 | | |
1100 | 1095 | | |
| |||
1131 | 1126 | | |
1132 | 1127 | | |
1133 | 1128 | | |
1134 | | - | |
| 1129 | + | |
1135 | 1130 | | |
1136 | 1131 | | |
1137 | | - | |
| 1132 | + | |
| 1133 | + | |
1138 | 1134 | | |
1139 | 1135 | | |
1140 | 1136 | | |
| |||
1150 | 1146 | | |
1151 | 1147 | | |
1152 | 1148 | | |
1153 | | - | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
1154 | 1158 | | |
1155 | 1159 | | |
1156 | 1160 | | |
| |||
0 commit comments