summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorRobert Walsh <robert.walsh@qlogic.com>2007-03-15 14:45:16 -0700
committerRoland Dreier <rolandd@cisco.com>2007-04-18 20:21:00 -0700
commit6ce73b07db7aa05d4a30716d6a99c832b6d9db4a (patch)
tree658ab91b4bae78227e80155b2ce0199ea36e9b43 /drivers/infiniband
parent0d6172a4284b21e4762e8638a4d693ef52f63bfe (diff)
downloadblackbird-op-linux-6ce73b07db7aa05d4a30716d6a99c832b6d9db4a.tar.gz
blackbird-op-linux-6ce73b07db7aa05d4a30716d6a99c832b6d9db4a.zip
IB/ipath: Check that a UD work request's address handle is valid
Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_ud.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_ud.c b/drivers/infiniband/hw/ipath/ipath_ud.c
index 57625b8c1b97..a518f7c8fa83 100644
--- a/drivers/infiniband/hw/ipath/ipath_ud.c
+++ b/drivers/infiniband/hw/ipath/ipath_ud.c
@@ -308,6 +308,11 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr)
goto bail;
}
+ if (wr->wr.ud.ah->pd != qp->ibqp.pd) {
+ ret = -EPERM;
+ goto bail;
+ }
+
/* IB spec says that num_sge == 0 is OK. */
if (wr->num_sge > qp->s_max_sge) {
ret = -EINVAL;
OpenPOWER on IntegriCloud