summaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-01-26 19:28:23 +0000
committerDavid S. Miller <davem@davemloft.net>2011-01-27 15:02:57 -0800
commit13707f9e5e46342b7b16c58be91ad93a476c3ffd (patch)
tree025764fd464f83300cab236da2ce4b26c5b9703c /drivers/net/bnx2.c
parentccf434380d1a67df2dcb9113206b77d0cb0a1cef (diff)
downloadblackbird-op-linux-13707f9e5e46342b7b16c58be91ad93a476c3ffd.tar.gz
blackbird-op-linux-13707f9e5e46342b7b16c58be91ad93a476c3ffd.zip
drivers/net: remove some rcu sparse warnings
Add missing __rcu annotations and helpers. minor : Fix some rcu_dereference() calls in macvtap Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r--drivers/net/bnx2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 3dbaf58f681b..2a961b7f7e17 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -435,7 +435,8 @@ bnx2_cnic_stop(struct bnx2 *bp)
struct cnic_ctl_info info;
mutex_lock(&bp->cnic_lock);
- c_ops = bp->cnic_ops;
+ c_ops = rcu_dereference_protected(bp->cnic_ops,
+ lockdep_is_held(&bp->cnic_lock));
if (c_ops) {
info.cmd = CNIC_CTL_STOP_CMD;
c_ops->cnic_ctl(bp->cnic_data, &info);
@@ -450,7 +451,8 @@ bnx2_cnic_start(struct bnx2 *bp)
struct cnic_ctl_info info;
mutex_lock(&bp->cnic_lock);
- c_ops = bp->cnic_ops;
+ c_ops = rcu_dereference_protected(bp->cnic_ops,
+ lockdep_is_held(&bp->cnic_lock));
if (c_ops) {
if (!(bp->flags & BNX2_FLAG_USING_MSIX)) {
struct bnx2_napi *bnapi = &bp->bnx2_napi[0];
OpenPOWER on IntegriCloud