Re: [PATCH, V2] i386: instead of poisoning .init zone, change protection bits to force a fault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux