Skip to content

Commit 6a98dcf

Browse files
Amerigo Wangdavem330
Amerigo Wang
authored andcommitted
ipv6: fix a RCU warning in net/ipv6/ip6_flowlabel.c
This patch fixes the following RCU warning: [ 51.680236] =============================== [ 51.681914] [ INFO: suspicious RCU usage. ] [ 51.683610] 3.8.0-rc6-next-20130206-sasha-00028-g83214f7-dirty #276 Tainted: G W [ 51.686703] ------------------------------- [ 51.688281] net/ipv6/ip6_flowlabel.c:671 suspicious rcu_dereference_check() usage! we should use rcu_dereference_bh() when we hold rcu_read_lock_bh(). Reported-by: Sasha Levin <[email protected]> Cc: David S. Miller <[email protected]> Cc: YOSHIFUJI Hideaki <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 14f8dc4 commit 6a98dcf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

net/ipv6/ip6_flowlabel.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ static DEFINE_SPINLOCK(ip6_fl_lock);
6565
static DEFINE_SPINLOCK(ip6_sk_fl_lock);
6666

6767
#define for_each_fl_rcu(hash, fl) \
68-
for (fl = rcu_dereference(fl_ht[(hash)]); \
68+
for (fl = rcu_dereference_bh(fl_ht[(hash)]); \
6969
fl != NULL; \
70-
fl = rcu_dereference(fl->next))
70+
fl = rcu_dereference_bh(fl->next))
7171
#define for_each_fl_continue_rcu(fl) \
72-
for (fl = rcu_dereference(fl->next); \
72+
for (fl = rcu_dereference_bh(fl->next); \
7373
fl != NULL; \
74-
fl = rcu_dereference(fl->next))
74+
fl = rcu_dereference_bh(fl->next))
7575

7676
#define for_each_sk_fl_rcu(np, sfl) \
7777
for (sfl = rcu_dereference_bh(np->ipv6_fl_list); \

0 commit comments

Comments
 (0)