summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_ud.c
diff options
context:
space:
mode:
authorRobert Walsh2007-03-15 22:45:16 +0100
committerRoland Dreier2007-04-19 05:21:00 +0200
commit6ce73b07db7aa05d4a30716d6a99c832b6d9db4a (patch)
tree658ab91b4bae78227e80155b2ce0199ea36e9b43 /drivers/infiniband/hw/ipath/ipath_ud.c
parentIB/ipath: Remove duplicate stuff from ipath_verbs.h (diff)
downloadkernel-qcow2-linux-6ce73b07db7aa05d4a30716d6a99c832b6d9db4a.tar.gz
kernel-qcow2-linux-6ce73b07db7aa05d4a30716d6a99c832b6d9db4a.tar.xz
kernel-qcow2-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/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 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;