diff options
author | Mike Marciniszyn <mike.marciniszyn@intel.com> | 2012-07-06 18:29:45 +0000 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-07-10 10:01:56 -0700 |
commit | 7e23017704172cb6508cb365eb2cae7335e5da71 (patch) | |
tree | fbe042dd007c6c87633864efae20bbac3ddc7aa1 /drivers/infiniband/hw/qib/qib_keys.c | |
parent | 8aac4cc3a9d7d7c2f203b7a8db521b604cfb5dc9 (diff) | |
download | linux-stable-7e23017704172cb6508cb365eb2cae7335e5da71.tar.gz linux-stable-7e23017704172cb6508cb365eb2cae7335e5da71.tar.bz2 linux-stable-7e23017704172cb6508cb365eb2cae7335e5da71.zip |
IB/qib: Fix sparse RCU warnings in qib_keys.c
Commit 8aac4cc3a9d7 ("IB/qib: RCU locking for MR validation") introduced
new sparse warnings in qib_keys.c.
Acked-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_keys.c')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_keys.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/qib/qib_keys.c b/drivers/infiniband/hw/qib/qib_keys.c index 970165b027f7..e9486c74c226 100644 --- a/drivers/infiniband/hw/qib/qib_keys.c +++ b/drivers/infiniband/hw/qib/qib_keys.c @@ -349,7 +349,9 @@ int qib_fast_reg_mr(struct qib_qp *qp, struct ib_send_wr *wr) if (pd->user || rkey == 0) goto bail; - mr = rkt->table[(rkey >> (32 - ib_qib_lkey_table_size))]; + mr = rcu_dereference_protected( + rkt->table[(rkey >> (32 - ib_qib_lkey_table_size))], + lockdep_is_held(&rkt->lock)); if (unlikely(mr == NULL || qp->ibqp.pd != mr->pd)) goto bail; |