Skip to content

Commit 1963507

Browse files
Madhuparna Bhowmikdavem330
authored andcommitted
net: kcm: kcmproc.c: Fix RCU list suspicious usage warning
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> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 10ee4b8 commit 1963507

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/kcm/kcmproc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ static int kcm_stats_seq_show(struct seq_file *seq, void *v)
261261
aggregate_strp_stats(&knet->aggregate_strp_stats,
262262
&strp_stats);
263263

264-
list_for_each_entry_rcu(mux, &knet->mux_list, kcm_mux_list) {
264+
list_for_each_entry(mux, &knet->mux_list, kcm_mux_list) {
265265
spin_lock_bh(&mux->lock);
266266
aggregate_mux_stats(&mux->stats, &mux_stats);
267267
aggregate_psock_stats(&mux->aggregate_psock_stats,

0 commit comments

Comments
 (0)