Re: BUG slab.c, buffer.c

Anton Altaparmakov (aia21@cam.ac.uk)
Tue, 27 Nov 2001 20:00:49 +0000


At 18:46 27/11/01, Martin Donnelly wrote:
>I noticed strange behaviour recently with a driver i'm developing and
>tried to replicate it in a simple module to determine if it was my
>driver or a kernel bug. Basically i allocate 120k with kmalloc then
>initialising this memory i get the following oops. (I've tried this on
>several machines with the same results)
>
>Any ideas what is wrong?
>[snip of oopsen]
>The code being use to generate this is:
>
>int init_module(void)
>{
> addr = kmalloc(GFP_KERNEL, mem_size);
> if(addr != NULL)
> {
> u8 *byte;
> u32 ix;
>
> byte = addr;
> for(ix = 0; ix < mempage_size; ix++)

Is mem_size >= mempage_size?

Anton

> {
> *byte = 0;
> byte++;
> }
> }
> return 0;
>}
>
>
>
>
>--
>Martin Donnelly Senior Software Engineer
> RAMiX Europe Ltd
>99 little bugs in the code, 99 bugs in the code,
>fix one bug, compile it again...
>101 little bugs in the code....
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/

-- 
   "I've not lost my mind. It's backed up on tape somewhere." - Unknown
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS Maintainer / WWW: http://linux-ntfs.sf.net/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/