From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933171AbcJ2R76 (ORCPT ); Sat, 29 Oct 2016 13:59:58 -0400 Received: from mail-lf0-f42.google.com ([209.85.215.42]:32997 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750816AbcJ2R74 (ORCPT ); Sat, 29 Oct 2016 13:59:56 -0400 MIME-Version: 1.0 In-Reply-To: <1477762981.7065.272.camel@edumazet-glaptop3.roam.corp.google.com> References: <1477762981.7065.272.camel@edumazet-glaptop3.roam.corp.google.com> From: Andrey Konovalov Date: Sat, 29 Oct 2016 19:59:53 +0200 Message-ID: Subject: Re: net/dccp: warning in dccp_feat_clone_sp_val/__might_sleep To: Eric Dumazet Cc: Cong Wang , Gerrit Renker , "David S. Miller" , dccp@vger.kernel.org, netdev , LKML , Dmitry Vyukov , Eric Dumazet Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Eric, Tested with both patches applied, still seeing the warning. Thanks! On Sat, Oct 29, 2016 at 7:43 PM, Eric Dumazet wrote: > On Sat, 2016-10-29 at 19:06 +0200, Andrey Konovalov wrote: >> Hi Cong, >> >> Tested with your patch, still getting a warning, though it's a little different: >> >> ------------[ cut here ]------------ >> WARNING: CPU: 1 PID: 3876 at kernel/sched/core.c:7724 >> __might_sleep+0x14c/0x1a0 kernel/sched/core.c:7719 >> do not call blocking ops when !TASK_RUNNING; state=1 set at >> [] prepare_to_wait+0xbc/0x210 >> kernel/sched/wait.c:178 >> Modules linked in: > > This looks like the following patch is needed, can you test it ? > Thanks ! > > diff --git a/net/dccp/output.c b/net/dccp/output.c > index b66c84db0766..74d8583a0d52 100644 > --- a/net/dccp/output.c > +++ b/net/dccp/output.c > @@ -228,6 +228,7 @@ static int dccp_wait_for_ccid(struct sock *sk, unsigned long delay) > > remaining = schedule_timeout(delay); > > + sched_annotate_sleep(); > lock_sock(sk); > sk->sk_write_pending--; > finish_wait(sk_sleep(sk), &wait); > > > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrey Konovalov Date: Sat, 29 Oct 2016 17:59:53 +0000 Subject: Re: net/dccp: warning in dccp_feat_clone_sp_val/__might_sleep Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: dccp@vger.kernel.org Hi Eric, Tested with both patches applied, still seeing the warning. Thanks! On Sat, Oct 29, 2016 at 7:43 PM, Eric Dumazet wrote: > On Sat, 2016-10-29 at 19:06 +0200, Andrey Konovalov wrote: >> Hi Cong, >> >> Tested with your patch, still getting a warning, though it's a little different: >> >> ------------[ cut here ]------------ >> WARNING: CPU: 1 PID: 3876 at kernel/sched/core.c:7724 >> __might_sleep+0x14c/0x1a0 kernel/sched/core.c:7719 >> do not call blocking ops when !TASK_RUNNING; state=1 set at >> [] prepare_to_wait+0xbc/0x210 >> kernel/sched/wait.c:178 >> Modules linked in: > > This looks like the following patch is needed, can you test it ? > Thanks ! > > diff --git a/net/dccp/output.c b/net/dccp/output.c > index b66c84db0766..74d8583a0d52 100644 > --- a/net/dccp/output.c > +++ b/net/dccp/output.c > @@ -228,6 +228,7 @@ static int dccp_wait_for_ccid(struct sock *sk, unsigned long delay) > > remaining = schedule_timeout(delay); > > + sched_annotate_sleep(); > lock_sock(sk); > sk->sk_write_pending--; > finish_wait(sk_sleep(sk), &wait); > > >