projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b1e985
)
RDMA/irdma: Validate number of CQ entries on create CQ
author
Sindhu Devale
<sindhu.devale@intel.com>
Thu, 16 Sep 2021 19:12:20 +0000
(14:12 -0500)
committer
Jason Gunthorpe
<jgg@nvidia.com>
Mon, 20 Sep 2021 17:13:23 +0000
(14:13 -0300)
Add lower bound check for CQ entries at creation time.
Fixes:
b48c24c2d710
("RDMA/irdma: Implement device supported verb APIs")
Link:
https://lore.kernel.org/r/20210916191222.824-3-shiraz.saleem@intel.com
Signed-off-by: Sindhu Devale <sindhu.devale@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/irdma/verbs.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/irdma/verbs.c
b/drivers/infiniband/hw/irdma/verbs.c
index
829ddfa
..
23c4748
100644
(file)
--- a/
drivers/infiniband/hw/irdma/verbs.c
+++ b/
drivers/infiniband/hw/irdma/verbs.c
@@
-2034,7
+2034,7
@@
static int irdma_create_cq(struct ib_cq *ibcq,
/* Kmode allocations */
int rsize;
- if (entries > rf->max_cqe) {
+ if (entries
< 1 || entries
> rf->max_cqe) {
err_code = -EINVAL;
goto cq_free_rsrc;
}