lkml.org 
[lkml]   [2001]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: BUG slab.c, buffer.c
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/

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.047 / U:1.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site