summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-11-28 04:34:34 +0900
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-28 04:36:10 +0900
commit06b446c8af5db5a98b2eaa30b513c79089ed254b (patch)
treeb1b2abec9775fc135d899b08351ac520a1197806
parente384a41141949843899affcf51f4e6e646c1fe9f (diff)
downloadlinux-stable-06b446c8af5db5a98b2eaa30b513c79089ed254b.tar.gz
linux-stable-06b446c8af5db5a98b2eaa30b513c79089ed254b.tar.bz2
linux-stable-06b446c8af5db5a98b2eaa30b513c79089ed254b.zip
Revert "Staging: comedi: integer overflow in do_insnlist_ioctl()"
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>
-rw-r--r--drivers/staging/comedi/comedi_fops.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index ed4853f194c4..ebdcecda3583 100644
--- 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) {