From 3d13a6221509364613b2580ed199e5ba7a5327e9 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Wed, 23 Nov 2011 14:43:03 +0000 Subject: [PATCH] Revert "Check integer overflow in do_insnlist_ioctl()" Xi Wang pointed out a flaw in the current check. --- comedi/comedi_fops.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index e46c7c4b..4d3a5dd1 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -701,12 +701,6 @@ static int do_insnlist_ioctl(comedi_device * dev, void *arg, void *file) goto error; } - if (sizeof(comedi_insn) * insnlist.n_insns < insnlist.n_insns) { - DPRINTK("number of instructions too large\n"); - ret = -EINVAL; - goto error; - } - insns = kmalloc(sizeof(comedi_insn) * insnlist.n_insns, GFP_KERNEL); if (!insns) { DPRINTK("kmalloc failed\n"); -- 2.26.2