linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
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
Date: Thu, 14 May 2020 09:40:08 -0700	[thread overview]
Message-ID: <20200514094008.6421ea71@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <20200514070204.3108-1-madhuparnabhowmik10@gmail.com>

On Thu, 14 May 2020 12:32:04 +0530 madhuparnabhowmik10@gmail.com wrote:
> From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
> 
> 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 <lkp@intel.com>
> Suggested-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
> ---
>  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!

  reply	other threads:[~2020-05-14 16:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14  7:02 [PATCH net] ipv6: Fix suspicious RCU usage warning in ip6mr madhuparnabhowmik10
2020-05-14 16:40 ` Jakub Kicinski [this message]
2020-05-15 17:32   ` Madhuparna Bhowmik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200514094008.6421ea71@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=cai@lca.pw \
    --cc=davem@davemloft.net \
    --cc=frextrite@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=madhuparnabhowmik10@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).