diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-10-19 12:14:12 +0300 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-03-20 09:59:04 -0700 |
commit | ff1706f4feb8e0e1a2e56a8dd57e17a4b45649b5 (patch) | |
tree | bd39150cfb039538e18159cad00dcb81336328dc /drivers/infiniband/hw/cxgb4 | |
parent | cfbf8d4857c26a8a307fb7cd258074c9dcd8c691 (diff) |
RDMA/cxgb4: Fix underflows in c4iw_create_qp()
These sizes should be unsigned so we don't allow negative values and
have underflow bugs. These can come from the user so there may be
security implications, but I have not tested this.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/qp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index 582936708e6..72ea152c5f4 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c @@ -1533,7 +1533,7 @@ struct ib_qp *c4iw_create_qp(struct ib_pd *pd, struct ib_qp_init_attr *attrs, struct c4iw_cq *schp; struct c4iw_cq *rchp; struct c4iw_create_qp_resp uresp; - int sqsize, rqsize; + unsigned int sqsize, rqsize; struct c4iw_ucontext *ucontext; int ret; struct c4iw_mm_entry *mm1, *mm2, *mm3, *mm4, *mm5 = NULL; |