[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1265654890.2843.27.camel@sbs-t61.sc.intel.com>
Date: Mon, 08 Feb 2010 10:48:10 -0800
From: Suresh Siddha <suresh.b.siddha@...el.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Arjan van de Ven <arjan@...ux.intel.com>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: PATCH? process_32.c:__switch_to() calls __math_state_restore()
before updating current_task
On Fri, 2010-02-05 at 04:44 -0800, Oleg Nesterov wrote:
> Could you please explain me another issue? I know nothing about fpu
> handling, I am reading this code trying to understand the unrelated
> bug with the old kernel.
>
> In short: why restore_i387_xstate() does init_fpu() when !used_math(),
> can't (or shouldn't) it merely do set_used_math() ?
>
> restore_i387_xstate:
>
> if (!used_math()) {
> err = init_fpu(tsk);
> if (err)
> return err;
> }
>
> note that buf != NULL. This means that used_math() was true when
> get_sigframe() was called, otherwise buf == sigcontext->fpstate
> would be NULL, right?
No. When the signal is delivered sigcontext->fpstate can be null and
when we return from the signal handler, user can update the
sigcontext->fpstate pointer and the user expects the kernel to update
the fpstate of the process accordingly.
> So, the task must have the valid ->thread.xstate,
Need not be.
thanks,
suresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists