Eric Dumazet <[email protected]> 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- References:
- [PATCH] i386: Add a temporary to make put_user more type safe.
- From: [email protected] (Eric W. Biederman)
- Re: [PATCH] i386: Add a temporary to make put_user more type safe.
- From: [email protected] (Eric W. Biederman)
- Re: [PATCH] i386: Add a temporary to make put_user more type safe.
- From: Andrew Morton <[email protected]>
- Re: [PATCH] i386: Add a temporary to make put_user more type safe.
- From: Andrew Morton <[email protected]>
- [PATCH] i386: instead of poisoning .init zone, change protection bits to force a fault
- From: Eric Dumazet <[email protected]>
- Re: [PATCH] i386: instead of poisoning .init zone, change protection bits to force a fault
- From: Benjamin LaHaise <[email protected]>
- [PATCH, V2] i386: instead of poisoning .init zone, change protection bits to force a fault
- From: Eric Dumazet <[email protected]>
- Re: [PATCH, V2] i386: instead of poisoning .init zone, change protection bits to force a fault
- From: Andrew Morton <[email protected]>
- Re: [PATCH, V2] i386: instead of poisoning .init zone, change protection bits to force a fault
- From: Eric Dumazet <[email protected]>
- [PATCH] i386: Add a temporary to make put_user more type safe.
- Prev by Date: Re: [PATCH 1/5] cpuset memory spread basic implementation
- Next by Date: [PATCH] remove ipmi pm_power_off redefinition
- Previous by thread: Re: [PATCH, V2] i386: instead of poisoning .init zone, change protection bits to force a fault
- Next by thread: Re: [PATCH, V2] i386: instead of poisoning .init zone, change protection bits to force a fault
- Index(es):