Messages in this thread | | | Date | Mon, 6 Feb 2006 01:28:09 -0800 | From | Andrew Morton <> | Subject | Re: [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/
| |