[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdUbg67zLqn7x_vpzEWpbuwjmxO5MYRNJQhxMpqtLxTVOg@mail.gmail.com>
Date: Sat, 16 Mar 2013 18:37:24 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Jiang Liu <liuj97@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
David Rientjes <rientjes@...gle.com>,
Jiang Liu <jiang.liu@...wei.com>,
Wen Congyang <wency@...fujitsu.com>,
Mel Gorman <mgorman@...e.de>, Minchan Kim <minchan@...nel.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Michal Hocko <mhocko@...e.cz>,
Jianguo Wu <wujianguo@...wei.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2, part3 01/12] mm: enhance free_reserved_area() to
support poisoning memory with zero
On Sat, Mar 16, 2013 at 6:03 PM, Jiang Liu <liuj97@...il.com> wrote:
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -5130,13 +5130,13 @@ unsigned long free_reserved_area(unsigned long start, unsigned long end,
> pos = start = PAGE_ALIGN(start);
> end &= PAGE_MASK;
> for (pages = 0; pos < end; pos += PAGE_SIZE, pages++) {
> - if (poison)
> + if ((unsigned int)poison <= 0xFF)
"if (poison >= 0)"? No cast needed.
> memset((void *)pos, poison, PAGE_SIZE);
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists