Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34302
b: refs/heads/master
c: eae33d4
h: refs/heads/master
v: v3
  • Loading branch information
Bryan O'Sullivan authored and Roland Dreier committed Sep 22, 2006
1 parent fca8e72 commit 64e24b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 98341f261893acd7bc5abee5ddc35337ef49e457
refs/heads/master: eae33d47a797e159306567643284a98ae7428ec4
7 changes: 6 additions & 1 deletion trunk/drivers/infiniband/hw/ipath/ipath_cq.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ struct ib_cq *ipath_create_cq(struct ib_device *ibdev, int entries,
struct ipath_cq_wc *wc;
struct ib_cq *ret;

if (entries > ib_ipath_max_cqes) {
if (entries < 1 || entries > ib_ipath_max_cqes) {
ret = ERR_PTR(-EINVAL);
goto done;
}
Expand Down Expand Up @@ -324,6 +324,11 @@ int ipath_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *udata)
u32 head, tail, n;
int ret;

if (cqe < 1 || cqe > ib_ipath_max_cqes) {
ret = -EINVAL;
goto bail;
}

/*
* Need to use vmalloc() if we want to support large #s of entries.
*/
Expand Down

0 comments on commit 64e24b4

Please sign in to comment.