git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RDMA/ucma: Correct option size check using optlen
[pandora-kernel.git]
/
drivers
/
infiniband
/
core
/
ucma.c
diff --git
a/drivers/infiniband/core/ucma.c
b/drivers/infiniband/core/ucma.c
index
550b81e
..
99295c3
100644
(file)
--- a/
drivers/infiniband/core/ucma.c
+++ b/
drivers/infiniband/core/ucma.c
@@
-1009,7
+1009,7
@@
static ssize_t ucma_set_option(struct ucma_file *file, const char __user *inbuf,
if (IS_ERR(ctx))
return PTR_ERR(ctx);
if (IS_ERR(ctx))
return PTR_ERR(ctx);
- if (unlikely(cmd.opt
val
> KMALLOC_MAX_SIZE))
+ if (unlikely(cmd.opt
len
> KMALLOC_MAX_SIZE))
return -EINVAL;
optval = kmalloc(cmd.optlen, GFP_KERNEL);
return -EINVAL;
optval = kmalloc(cmd.optlen, GFP_KERNEL);