From 7346722bdb0988490d7e0916b90b62f34009594a Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Tue, 15 Aug 2006 18:58:02 +0000 Subject: [PATCH] Fix rounding up of buffer size to integer multiple of page size. --- comedi/comedi_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index 33afcebd..1677cbc3 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -258,7 +258,7 @@ static int do_bufconfig_ioctl(comedi_device *dev,void *arg) /* make sure buffer is an integral number of pages * (we round up) */ - bc.size = (bc.size + 1)&PAGE_MASK; + bc.size = (bc.size + PAGE_SIZE - 1) & PAGE_MASK; ret = comedi_buf_alloc(dev, s, bc.size); if(ret < 0) return ret; -- 2.26.2