summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/ipath/ipath_keys.c
diff options
context:
space:
mode:
authorDave Olson <dave.olson@qlogic.com>2008-12-05 11:14:38 -0800
committerRoland Dreier <rolandd@cisco.com>2008-12-05 11:14:38 -0800
commit3d0890985ac4dff781b7feba19fedda547314749 (patch)
tree4e18e4e70c32abf9450c223db97affb1d05dbeeb /drivers/infiniband/hw/ipath/ipath_keys.c
parent1bf7724e093cf3071d943d53bfa4de8b8e50426b (diff)
IB/ipath: Add locking for interrupt use of ipath_pd contexts vs free
Fixes timing race resulting in panic. Not a performance sensitive path. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_keys.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_keys.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_keys.c b/drivers/infiniband/hw/ipath/ipath_keys.c
index 8f32b17a5eed..c0e933fec218 100644
--- a/drivers/infiniband/hw/ipath/ipath_keys.c
+++ b/drivers/infiniband/hw/ipath/ipath_keys.c
@@ -132,6 +132,7 @@ int ipath_lkey_ok(struct ipath_qp *qp, struct ipath_sge *isge,
* (see ipath_get_dma_mr and ipath_dma.c).
*/
if (sge->lkey == 0) {
+ /* always a kernel port, no locking needed */
struct ipath_pd *pd = to_ipd(qp->ibqp.pd);
if (pd->user) {
@@ -211,6 +212,7 @@ int ipath_rkey_ok(struct ipath_qp *qp, struct ipath_sge_state *ss,
* (see ipath_get_dma_mr and ipath_dma.c).
*/
if (rkey == 0) {
+ /* always a kernel port, no locking needed */
struct ipath_pd *pd = to_ipd(qp->ibqp.pd);
if (pd->user) {