Re: [PATCH] stop null ptr deference in __alloc_pages

From: Samuel Ortiz (sortiz@dbear.engr.sgi.com)
Date: Fri Mar 08 2002 - 17:40:24 EST


On Fri, 8 Mar 2002, Martin J. Bligh wrote:

> >> I should have also mentioned that:
> >>
> >> 1) I shouldn't need the SGI patch, though it might help performance.
> >
> > Why shouldn't you need it ? It is NUMA generic, and totally arch
> > independent.
>
> I just mean the kernel shouldn't panic if I don't have it.
That is true...

> > And it actually helps performance. I also allows the kernel to have a
> > single memory allocation path. I think it is cleaner than calling _alloc_pages()
> > from numa.c
> >
> >> 2) The kernel panics without my fix, and runs fine with it.
> > I hope so :-)
> > But your fix is at the same time useless and harmless for UMA machines.
>
> Yup, though I suppose we could shave off a couple of nanoseconds by
> surrounding my little check with #ifdef CONFIG_NUMA.
>
> > OTOH, the SGI patch doesn't modify __alloc_pages(). I think I'm a little
> > too picky here...
>
> With the #ifdef, I won't really do this either (at least for the code generated).
>
> The SGI patch is probably a good thing, and I'll pick it up and try it
> sometime soon. The only real problem is that it's not in the mainline
> already. Until such time as it gets there, the fix I posted is trivial,
> and easily seen to be correct (well, I'm biased ;-) ), and should get
> shoved into the mainline much easier.
You're right. It's on -aa kernels, so it'll get in mainline soon.

Cheers,
Samuel.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 15 2002 - 22:00:10 EST