* [PATCH] net: kcm: kcmproc.c: Fix RCU list suspicious usage warning
@ 2020-03-16 17:13 madhuparnabhowmik10
2020-03-17 0:19 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: madhuparnabhowmik10 @ 2020-03-16 17:13 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-kernel, frextrite, paulmck, joel, Madhuparna Bhowmik
From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
This path fixes the suspicious RCU usage warning reported by
kernel test robot.
net/kcm/kcmproc.c:#RCU-list_traversed_in_non-reader_section
There is no need to use list_for_each_entry_rcu() in
kcm_stats_seq_show() as the list is always traversed under
knet->mutex held.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
---
net/kcm/kcmproc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/kcm/kcmproc.c b/net/kcm/kcmproc.c
index 370da2f80e3c..25c1007f1098 100644
--- a/net/kcm/kcmproc.c
+++ b/net/kcm/kcmproc.c
@@ -261,7 +261,7 @@ static int kcm_stats_seq_show(struct seq_file *seq, void *v)
aggregate_strp_stats(&knet->aggregate_strp_stats,
&strp_stats);
- list_for_each_entry_rcu(mux, &knet->mux_list, kcm_mux_list) {
+ list_for_each_entry(mux, &knet->mux_list, kcm_mux_list) {
spin_lock_bh(&mux->lock);
aggregate_mux_stats(&mux->stats, &mux_stats);
aggregate_psock_stats(&mux->aggregate_psock_stats,
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: kcm: kcmproc.c: Fix RCU list suspicious usage warning
2020-03-16 17:13 [PATCH] net: kcm: kcmproc.c: Fix RCU list suspicious usage warning madhuparnabhowmik10
@ 2020-03-17 0:19 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-03-17 0:19 UTC (permalink / raw)
To: madhuparnabhowmik10; +Cc: netdev, linux-kernel, frextrite, paulmck, joel
From: madhuparnabhowmik10@gmail.com
Date: Mon, 16 Mar 2020 22:43:52 +0530
> From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
>
> This path fixes the suspicious RCU usage warning reported by
> kernel test robot.
>
> net/kcm/kcmproc.c:#RCU-list_traversed_in_non-reader_section
>
> There is no need to use list_for_each_entry_rcu() in
> kcm_stats_seq_show() as the list is always traversed under
> knet->mutex held.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Applied to net-next, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-17 0:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16 17:13 [PATCH] net: kcm: kcmproc.c: Fix RCU list suspicious usage warning madhuparnabhowmik10
2020-03-17 0:19 ` David Miller
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).