lkml.org 
[lkml]   [2008]   [Mar]   [6]   [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
On Tue 2008-03-04 09:55:28, Suresh Siddha wrote:
> On Tue, Mar 04, 2008 at 11:32:20AM +0100, Ingo Molnar wrote:
> >
> > * 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.
>
> 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.
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2008-03-06 15:49    [W:0.087 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site