projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e384a41
)
Revert "Staging: comedi: integer overflow in do_insnlist_ioctl()"
author
Greg Kroah-Hartman
<gregkh@suse.de>
Sun, 27 Nov 2011 19:34:34 +0000
(
04:34
+0900)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Sun, 27 Nov 2011 19:36:10 +0000
(
04:36
+0900)
This reverts commit
e384a41141949843899affcf51f4e6e646c1fe9f
.
It's not the correct way to solve this issue.
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/comedi_fops.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/staging/comedi/comedi_fops.c
b/drivers/staging/comedi/comedi_fops.c
index ed4853f194c43bba5089343b9afd493eca5cf058..ebdcecda3583f9d6879cf35cb77d144b57f67749 100644
(file)
--- a/
drivers/staging/comedi/comedi_fops.c
+++ b/
drivers/staging/comedi/comedi_fops.c
@@
-670,11
+670,6
@@
static int do_insnlist_ioctl(struct comedi_device *dev,
goto error;
}
- if (sizeof(struct comedi_insn) * insnlist.n_insns < insnlist.n_insns) {
- ret = -EINVAL;
- goto error;
- }
-
insns =
kmalloc(sizeof(struct comedi_insn) * insnlist.n_insns, GFP_KERNEL);
if (!insns) {