summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/ipath/ipath_ud.c
diff options
context:
space:
mode:
authorRobert Walsh <robert.walsh@qlogic.com>2007-03-15 21:45:16 (GMT)
committerRoland Dreier <rolandd@cisco.com>2007-04-19 03:21:00 (GMT)
commit6ce73b07db7aa05d4a30716d6a99c832b6d9db4a (patch)
tree658ab91b4bae78227e80155b2ce0199ea36e9b43 /drivers/infiniband/hw/ipath/ipath_ud.c
parent0d6172a4284b21e4762e8638a4d693ef52f63bfe (diff)
downloadlinux-6ce73b07db7aa05d4a30716d6a99c832b6d9db4a.tar.xz
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/hw/ipath/ipath_ud.c')
-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 57625b8..a518f7c 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;