lkml.org 
[lkml]   [2008]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 2/2] x86, fpu: lazy allocation of FPU area - v3

* Suresh Siddha <suresh.b.siddha@intel.com> wrote:

> On Mon, Mar 03, 2008 at 08:20:12PM -0500, Christoph Hellwig wrote:
> > On Mon, Mar 03, 2008 at 03:02:46PM -0800, Suresh Siddha wrote:
> > > + /*
> > > + * Memory allocation at the first usage of the FPU and other state.
> > > + */
> > > + if (!tsk->thread.xstate)
> > > + tsk->thread.xstate = kmem_cache_alloc(task_xstate_cachep, GFP_KERNEL);
> >
> > Also don't we need some kind of error handling here?
>
> Currently it uses SLAB_PANIC.

but SLAB_PANIC only covers kmem_cache_create() failures.

kmem_cache_alloc() can fail (return NULL) and not handling it is a bug.

Ingo


\
 
 \ /
  Last update: 2008-03-04 11:35    [from the cache]
©2003-2011 Jasper Spaans