IB/ipath - check that a UD work request's address handle is valid

From: Robert Walsh <robert.walsh@qlogic.com>
Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>

diff -r 86faa438e61f drivers/infiniband/hw/ipath/ipath_ud.c
--- a/drivers/infiniband/hw/ipath/ipath_ud.c	Mon Feb 26 13:33:58 2007 -0800
+++ b/drivers/infiniband/hw/ipath/ipath_ud.c	Mon Feb 26 14:14:39 2007 -0800
@@ -305,6 +305,11 @@ int ipath_post_ud_send(struct ipath_qp *
 
 	if (!(ib_ipath_state_ops[qp->state] & IPATH_PROCESS_SEND_OK)) {
 		ret = 0;
+		goto bail;
+	}
+
+	if (wr->wr.ud.ah->pd != qp->ibqp.pd) {
+		ret = -EPERM;
 		goto bail;
 	}
 
