Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1468761ybk; Thu, 14 May 2020 09:42:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUtMOhqP7qX/xrqHwFlduNyyqcFLEOOlr94YMys107i+zPQsKYGmmKjHZ+BUG99J20y5pU X-Received: by 2002:aa7:da04:: with SMTP id r4mr4719479eds.346.1589474549069; Thu, 14 May 2020 09:42:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589474549; cv=none; d=google.com; s=arc-20160816; b=tBoJEDDcVKVp/3xszrPnSi6Yvmau/MCS7/AQ5sNLqcitZZQui/3NtV9+xT7TlPhgqX Y41wmMXMnKFwmOLkUlO/6BoRleZuIckd8p1omSI+zGz5ralKyAvWIKsZgOh+98ly/W73 SJsH2yM0K6vmw+xy47V39orrNy4kGl62OuP91oiDBUkEQs5kgajOg19WbPmCyQuI3idd kqjXYKGUnrMKz49l+tZUgnpcQoGaFVzrvqprRj87pagz92BK7fXcsWQWHCDTCy9RfuKr mRGNwQFmmZSjEcgU3D97krRnn5ue/foT9f+K8VCrPybk+TznUAt6uWwzg553tOFv0DwM qCIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=/hLiJRtITCFsiuwfL44Cr096b1X4UbhW6Mg17knMQI0=; b=k92gkQYveKb/D4OdtjiVjQNg7b0VOBhGE3YFeVk5gKJwal2KZGH2MDfwY81hKzeem2 MWtGY2kVn4pyGUGJaDGwSurwIJlIVNUDuI5H1gXZDyrmQLmEnKx8IVxX+M4EOozDuM9p tKlb5Lqfews1grJRlmoXdrd8FoPPqjC0rYx4V6ZbnOavwIRq/kNiqx6lNiXACzHvMHj+ 2Viw+0PoorxR6u6h03HwqSKtHNCjfSMgoCtTvQze2OGoXAgjaIK0RaRR91VYGJRZs5Ku mVx8W/qDQvvvsASmQjIEUu0Zs86a8CPeL7X1ZLL7yfvU9za0+F4Jhch7KVI2DaFd8OTb m8Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JiSnK00b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ck20si2094555ejb.528.2020.05.14.09.42.06; Thu, 14 May 2020 09:42:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JiSnK00b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726179AbgENQkL (ORCPT + 99 others); Thu, 14 May 2020 12:40:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:55112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726067AbgENQkL (ORCPT ); Thu, 14 May 2020 12:40:11 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0A688206A5; Thu, 14 May 2020 16:40:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589474410; bh=Wbe+BLJ8SmtXx7TidpeEcsibW884yBOuoni+9QEk6pk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JiSnK00bfBAsfzapkii2tTsCXKRL/+zpVWF6Kf5bL3ubiTUyurm4QoPoOQgJ6qvRP Z6Jp+Ka/ogyk2kjhieJcUcl0zwMq5lNOrsvdN7rIsxYGvLK1hUlXjpL6eSxrgonz1m O4kDO0YSzVvwB/jxCbopDHYsLjp+kjfTsyGZRrsg= Date: Thu, 14 May 2020 09:40:08 -0700 From: Jakub Kicinski To: madhuparnabhowmik10@gmail.com Cc: davem@davemloft.net, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, sfr@canb.auug.org.au, frextrite@gmail.com, joel@joelfernandes.org, paulmck@kernel.org, cai@lca.pw Subject: Re: [PATCH net] ipv6: Fix suspicious RCU usage warning in ip6mr Message-ID: <20200514094008.6421ea71@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20200514070204.3108-1-madhuparnabhowmik10@gmail.com> References: <20200514070204.3108-1-madhuparnabhowmik10@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 14 May 2020 12:32:04 +0530 madhuparnabhowmik10@gmail.com wrote: > From: Madhuparna Bhowmik > > This patch fixes the following warning: > > ============================= > WARNING: suspicious RCU usage > 5.7.0-rc4-next-20200507-syzkaller #0 Not tainted > ----------------------------- > net/ipv6/ip6mr.c:124 RCU-list traversed in non-reader section!! > > ipmr_new_table() returns an existing table, but there is no table at > init. Therefore the condition: either holding rtnl or the list is empty > is used. > > Fixes: d13fee049f ("Default enable RCU list lockdep debugging with .."): WARNING: suspicious RCU usage Fixes tag: Fixes: d13fee049f ("Default enable RCU list lockdep debugging with .."): WARNING: suspicious RCU usage Has these problem(s): - Target SHA1 does not exist I think the message at the end is confusing automation, could you use the standard Fixes tag format, please? > Reported-by: kernel test robot > Suggested-by: Jakub Kicinski > Signed-off-by: Madhuparna Bhowmik > --- > net/ipv6/ip6mr.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c > index 65a54d74acc1..fbe282bb8036 100644 > --- a/net/ipv6/ip6mr.c > +++ b/net/ipv6/ip6mr.c > @@ -98,7 +98,7 @@ static void ipmr_expire_process(struct timer_list *t); > #ifdef CONFIG_IPV6_MROUTE_MULTIPLE_TABLES > #define ip6mr_for_each_table(mrt, net) \ > list_for_each_entry_rcu(mrt, &net->ipv6.mr6_tables, list, \ > - lockdep_rtnl_is_held()) > + lockdep_rtnl_is_held() || list_empty(&net->ipv6.mr6_tables)) double space, line over 80 chars > static struct mr_table *ip6mr_mr_table_iter(struct net *net, > struct mr_table *mrt) Other than these nits looks good, thanks!