diff options
author | Amerigo Wang <amwang@redhat.com> | 2013-02-07 10:52:40 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-08 17:55:48 -0500 |
commit | 6a98dcf032106eceb6827e0a7cc667250683f762 (patch) | |
tree | 1013315910d11d88ce380927cb32303062a0242d /net/ipv6 | |
parent | 14f8dc49532f765968ff37c3b99edbeb99004ace (diff) |
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 <sasha.levin@oracle.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ip6_flowlabel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index ea42bf40a997..a7da2f472479 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c | |||
@@ -65,13 +65,13 @@ static DEFINE_SPINLOCK(ip6_fl_lock); | |||
65 | static DEFINE_SPINLOCK(ip6_sk_fl_lock); | 65 | static DEFINE_SPINLOCK(ip6_sk_fl_lock); |
66 | 66 | ||
67 | #define for_each_fl_rcu(hash, fl) \ | 67 | #define for_each_fl_rcu(hash, fl) \ |
68 | for (fl = rcu_dereference(fl_ht[(hash)]); \ | 68 | for (fl = rcu_dereference_bh(fl_ht[(hash)]); \ |
69 | fl != NULL; \ | 69 | fl != NULL; \ |
70 | fl = rcu_dereference(fl->next)) | 70 | fl = rcu_dereference_bh(fl->next)) |
71 | #define for_each_fl_continue_rcu(fl) \ | 71 | #define for_each_fl_continue_rcu(fl) \ |
72 | for (fl = rcu_dereference(fl->next); \ | 72 | for (fl = rcu_dereference_bh(fl->next); \ |
73 | fl != NULL; \ | 73 | fl != NULL; \ |
74 | fl = rcu_dereference(fl->next)) | 74 | fl = rcu_dereference_bh(fl->next)) |
75 | 75 | ||
76 | #define for_each_sk_fl_rcu(np, sfl) \ | 76 | #define for_each_sk_fl_rcu(np, sfl) \ |
77 | for (sfl = rcu_dereference_bh(np->ipv6_fl_list); \ | 77 | for (sfl = rcu_dereference_bh(np->ipv6_fl_list); \ |