On 01/29/2015 04:56 PM, Oleg Nesterov wrote:

> How about the trivial patch below (on top of this series) ?

Hey, I just typed that, too! :)

Reviewed-by: Rik van Riel <r...@redhat.com>

> --- x/arch/x86/kernel/traps.c
> +++ x/arch/x86/kernel/traps.c
> @@ -313,7 +313,7 @@ dotraplinkage void do_bounds(struct pt_r
>        * It is not directly accessible, though, so we need to
>        * do an xsave and then pull it out of the xsave buffer.
>        */
> -     fpu_save_init(&tsk->thread.fpu);
> +     unlazy_fpu(tsk);
>       xsave_buf = &(tsk->thread.fpu.state->xsave);
>       bndcsr = get_xsave_addr(xsave_buf, XSTATE_BNDCSR);
>       if (!bndcsr)
> --- x/arch/x86/mm/mpx.c
> +++ x/arch/x86/mm/mpx.c
> @@ -352,7 +352,7 @@ static __user void *task_get_bounds_dir(
>        * The bounds directory pointer is stored in a register
>        * only accessible if we first do an xsave.
>        */
> -     fpu_save_init(&tsk->thread.fpu);
> +     unlazy_fpu(tsk);
>       bndcsr = get_xsave_addr(&tsk->thread.fpu.state->xsave, XSTATE_BNDCSR);
>       if (!bndcsr)
>               return MPX_INVALID_BOUNDS_DIR;
> 

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

Reply via email to