Re: [RFC] free_pages stuff

From: Geert Uytterhoeven
Date: Tue Dec 22 2015 - 03:21:20 EST


On Tue, Dec 22, 2015 at 3:22 AM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>> And if the code really explicitly wants a page (or set of aligned pages)
>> for some vm reason, I suspect having the cast there isn't a bad thing. It's
>> clearly not just a random pointer allocation if the bit pattern of the
>> pointer matters.
>
> BTW, I'm not sure we don't have code that would assume that
> kmalloc(PAGE_SIZE,...) always returns something PAGE_SIZE-aligned.

Yeah, needs-to-be-PAGE_SIZE-aligned is probably one of the main
reasons of not calling kmalloc().

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/