Message ID | 576DF09B.6010406@huawei.com |
---|---|
State | New |
Headers | show |
On 2016/6/28 3:50, Cong Wang wrote: > On Fri, Jun 24, 2016 at 7:46 PM, Ding Tianhong <dingtianhong@huawei.com> wrote: >> diff --git a/kernel/notifier.c b/kernel/notifier.c >> index fd2c9ac..9c30411 100644 >> --- a/kernel/notifier.c >> +++ b/kernel/notifier.c >> @@ -92,6 +92,8 @@ static int notifier_call_chain(struct notifier_block **nl, >> #endif >> ret = nb->notifier_call(nb, val, v); >> >> + cond_resched(); >> + >> if (nr_calls) >> (*nr_calls)++; > > NAK. > > You can't do a resched in atomic context in __atomic_notifier_call_chain(). > > Sorry, I miss this, so I think add touch_nmi_watchdog looks like the best solution for this problem. Thanks Ding
=================================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, so add cond_resched() in the loops to fix this problem, and it will not panic again. Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> --- kernel/notifier.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/notifier.c b/kernel/notifier.c index fd2c9ac..9c30411 100644 --- a/kernel/notifier.c +++ b/kernel/notifier.c @@ -92,6 +92,8 @@ static int notifier_call_chain(struct notifier_block **nl, #endif ret = nb->notifier_call(nb, val, v); + cond_resched(); + if (nr_calls) (*nr_calls)++;