Re: [patch 2/2] x86, fpu: lazy allocation of FPU area - v3

Suresh Siddha
2008-03-06T19:12:20Z

On Thu, Mar 06, 2008 at 04:51:41PM +0100, Ingo Molnar wrote:
>
> * Pavel Machek <pavel@ucw.cz> wrote:
>
> > > > kmem_cache_alloc() can fail (return NULL) and not handling it is a
> > > > bug.
> > >
> > > oops. you are correct. Will send a sigsegv in the failure case then.
> > > Thanks.
> >
> > You are introducing possibility of hard to debug error, where previous
> > code just worked... Does not look like good idea to me.
>
> hm, how does it differ from any other allocation failure? We could fail
> to allocate a pagetable page. We could fail to allocate the task_struct
> to begin with.

Yes. This happens under out of memory conditions. And we are also using
GFP_KERNEL here, which can block.