lkml.org 
[lkml]   [2006]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH, V2] i386: instead of poisoning .init zone, change protection bits to force a fault
Eric Dumazet <dada1@cosmosbay.com> wrote:
>
> > #ifdef CONFIG_DEBUG_INITDATA
> > + /*
> > + * Unmap the page, and leak it. So any further accesses will
> > + * oops.
> > + */
> > change_page_attr(virt_to_page(addr), 1, __pgprot(0));
> > #else
> > memset((void *)addr, 0xcc, PAGE_SIZE);
> > -#endif
> > free_page(addr);
> > +#endif
> > totalram_pages++;
> > }
> > printk(KERN_INFO "Freeing %s: %ldk freed\n", what, (end - begin) >> 10);
>
> I wonder if you dont have to move the 'totalram_pages++;' next to the
> free_page(addr) call (ie inside the #else/#endif block)
>

yup, thanks.

But I'm inclined to drop the whole patch - I don't see how it can detect
any bugs which CONFIG_DEBUG_PAGEALLOC won't find.

-
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: 2006-02-06 10:31    [W:0.067 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site