From: Greg Kroah-Hartman Date: Sun, 27 Nov 2011 19:34:34 +0000 (+0900) Subject: Revert "Staging: comedi: integer overflow in do_insnlist_ioctl()" X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=06b446c8af5db5a98b2eaa30b513c79089ed254b;p=linux-beck.git 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 Signed-off-by: Greg Kroah-Hartman --- 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) {