Re: 2.6.25-rc7-git2: Reported regressions from 2.6.24

From: Linus Torvalds
Date: Fri Mar 28 2008 - 14:21:45 EST




On Fri, 28 Mar 2008, Pekka Enberg wrote:
>
> On Fri, Mar 28, 2008 at 7:27 PM, Linus Torvalds
> <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> > So the *last* thing we want to do is to clear GFP_ZERO in multiple subtle
> > places based on new random code being added. We want to clear it at the
> > top level, so that no other code never ever even has to _think_ about it!
>
> We are clearing it in one place, just before calling alloc_pages.

BUT THAT IS TOTALLY IRRELEVANT.

We're not clearing it in kmalloc_large()!

What's so hard to understand?

> [Yes, it's hard to spot, it's in new_slab() where we call
> allocate_slab().] I'm okay with moving it to top level but I don't see
> how that fixes any of the bugs mentioned here.

That stupid clearing in new_slab() is totally and utterly irrelevant (in
addition to the fact that it's hard to spot).

The point was never new_slab(). So why do you even mention it?

The code in question is __slab_alloc(). It did *not* clear it correctly
before its uses (__slab_alloc -> kmalloc_large -> __get_free_pages).

Linus
--
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/