diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_ud.c | 5 |
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 eeff19800db7..3b6d00b9b8be 100644 --- a/drivers/infiniband/hw/ipath/ipath_ud.c +++ b/drivers/infiniband/hw/ipath/ipath_ud.c | |||
@@ -275,6 +275,11 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr) | |||
275 | len += wr->sg_list[i].length; | 275 | len += wr->sg_list[i].length; |
276 | ss.num_sge++; | 276 | ss.num_sge++; |
277 | } | 277 | } |
278 | /* Check for invalid packet size. */ | ||
279 | if (len > ipath_layer_get_ibmtu(dev->dd)) { | ||
280 | ret = -EINVAL; | ||
281 | goto bail; | ||
282 | } | ||
278 | extra_bytes = (4 - len) & 3; | 283 | extra_bytes = (4 - len) & 3; |
279 | nwords = (len + extra_bytes) >> 2; | 284 | nwords = (len + extra_bytes) >> 2; |
280 | 285 | ||