From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752864AbbCIRge (ORCPT ); Mon, 9 Mar 2015 13:36:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34380 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751161AbbCIRgd (ORCPT ); Mon, 9 Mar 2015 13:36:33 -0400 Message-ID: <54FDDA09.3050003@redhat.com> Date: Mon, 09 Mar 2015 13:36:09 -0400 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Oleg Nesterov , Dave Hansen , Borislav Petkov , Ingo Molnar CC: Andy Lutomirski , Linus Torvalds , Pekka Riikonen , Suresh Siddha , LKML , "Yu, Fenghua" , Quentin Casasnovas Subject: Re: [PATCH] x86/fpu: drop_fpu() should not assume that tsk == current References: <54F74F59.5070107@intel.com> <20150309171041.GB11388@redhat.com> In-Reply-To: <20150309171041.GB11388@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/09/2015 01:10 PM, Oleg Nesterov wrote: > drop_fpu() does clear_used_math() and usually this is correct because > tsk == current. However switch_fpu_finish()->restore_fpu_checking() is > called before it updates the "current_task" variable. If it fails, we > will wrongly clear the PF_USED_MATH flag of the previous task. Ouch. Good catch. > Signed-off-by: Oleg Nesterov > Cc: Reviewed-by: Rik van Riel