lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 14 May 2020 12:32:04 +0530 From: madhuparnabhowmik10@...il.com To: davem@...emloft.net, kuznet@....inr.ac.ru, yoshfuji@...ux-ipv6.org, kuba@...nel.org Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org, sfr@...b.auug.org.au, frextrite@...il.com, joel@...lfernandes.org, paulmck@...nel.org, cai@....pw, Madhuparna Bhowmik <madhuparnabhowmik10@...il.com> Subject: [PATCH net] ipv6: Fix suspicious RCU usage warning in ip6mr From: Madhuparna Bhowmik <madhuparnabhowmik10@...il.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 Reported-by: kernel test robot <lkp@...el.com> Suggested-by: Jakub Kicinski <kuba@...nel.org> Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@...il.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)) static struct mr_table *ip6mr_mr_table_iter(struct net *net, struct mr_table *mrt) -- 2.17.1
Powered by blists - more mailing lists