From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752080AbcF1Db4 (ORCPT ); Mon, 27 Jun 2016 23:31:56 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:14704 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751862AbcF1Dbz (ORCPT ); Mon, 27 Jun 2016 23:31:55 -0400 Subject: Re: [PATCH] notifier: Fix soft lockup for notifier_call_chain(). To: Cong Wang References: <576DF09B.6010406@huawei.com> CC: , Ingo Molnar , LKML , Eric Dumazet , "David S. Miller" , Netdev From: Ding Tianhong Message-ID: <5771EF72.3060101@huawei.com> Date: Tue, 28 Jun 2016 11:30:58 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.22.246] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090205.5771EF99.0082,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: c07195566113c832c5cd2f0f4f91b6a5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/6/28 3:50, Cong Wang wrote: > On Fri, Jun 24, 2016 at 7:46 PM, Ding Tianhong 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