=================================cut here========================================
It looks that the notifier_call_chain has to deal with too much handler, and will not
feed the watchdog until finish the work, and the notifier_call_chain may be called
in atomic context, so add touch_nmi_watchdog() in the loops to fix this problem,
and it will not panic again.
v2: add cond_resched() will break the atomic context, so feed the watchdog in
the loops to fix this bug.
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
---
kernel/notifier.c | 3 +++
1 file changed, 3 insertions(+)
@@ -5,6 +5,7 @@
#include <linux/rcupdate.h>
#include <linux/vmalloc.h>
#include <linux/reboot.h>
+#include <linux/nmi.h>
/*
* Notifier list for kernel code which wants to be called
@@ -92,6 +93,8 @@ static int notifier_call_chain(struct notifier_block **nl,
#endif
ret = nb->notifier_call(nb, val, v);
+ touch_nmi_watchdog();
+
if (nr_calls)
(*nr_calls)++;