Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1468227ybk; Thu, 14 May 2020 09:41:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVr//8Sr7oD/K+aFNX2ZNODBSADfyJXbkd8KiLvg7fBdHmqSvIgua4vCy99GD81vrwaLXI X-Received: by 2002:a50:d50f:: with SMTP id u15mr4759361edi.244.1589474500088; Thu, 14 May 2020 09:41:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589474500; cv=none; d=google.com; s=arc-20160816; b=AIZHFAX6U62PvTKEUTiGmYkAXPiZMHxXSNe/Tki5KoI7cjavVpbOA5XFhz+wJQkjuq KvPHW1uc3PJrqm+geXOdof3EKSUXC637U42E9V5O7rs5GfE62ITKSbfayzkOwR6kF3dE k2j4ohDx8SIm49fZkCX4F4eRvgXuTaEA+NX8K35l8LA/5gI0Od2bqoaLAHWvNDoQlKBa S+zigZWGCw9jlron4VMPPZ4e+LGBGbGevICM2t2RgtdhSxdPJ/WVTeAK/skA2E4XbZID RzSl0kdmsgjhJ94amaaWqwFUZ/fDd+kUaF56N2OMiLyGkgegdBqffo96ZihaFgietr4t L05A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RGov0R+2vKmVwOTCdPFIbjKwSHhb2dT0UH4D5to6ewA=; b=cvnSQcxfWHO5TR1X/pWfLgBtmlfjPrXKo/fNY0Z8NYf3iRwUYKGz4J9/fpLjlyGkO+ tea/Rl5grB5yxABeFQZTX1juf84RmtMofUf2G/4/gjpBt5iN/OST7WC/kTwiiwH0PolN mn8D/9uS3P72h0l46ts5TyPvFs+SkPxje26iA0fG2AjrzAeQXTItkz4e7x/VgxTh/idK uAXNgGdkMRxmx0L1LyIMaxmEjzlKVWrRM34n3SIhlF6YrEkf4JMUjlnWzQsmpQByqlhN d/y9rTPP3kZzdiuT/GKXElvog6lAK5ZbZCofTHBDv4gnuZ8wglqlG5y5vVEUxqMJruEu eFFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=OMlkiSty; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c4si1920947edg.353.2020.05.14.09.41.15; Thu, 14 May 2020 09:41:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=OMlkiSty; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726062AbgENQjx (ORCPT + 99 others); Thu, 14 May 2020 12:39:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725975AbgENQjx (ORCPT ); Thu, 14 May 2020 12:39:53 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17504C061A0C for ; Thu, 14 May 2020 09:39:53 -0700 (PDT) Received: from zn.tnic (p200300ec2f0bbd008499a97412b4f89f.dip0.t-ipconnect.de [IPv6:2003:ec:2f0b:bd00:8499:a974:12b4:f89f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 6BA691EC0351; Thu, 14 May 2020 18:39:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1589474391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=RGov0R+2vKmVwOTCdPFIbjKwSHhb2dT0UH4D5to6ewA=; b=OMlkiStyr3E38Yx7TZBpgEYcVTlKoAIh9/LI4rWAFCKGCJUtqfzRiMuOW9bF2WW9HeSkz2 mXyMJZi19uYv3X2jQwCducgit9ZUrMoj023IrpG4KuhkOsm9TtvPaVBPHU9RAr5lFbJJ5W O7SwoDJ6coAAUBCGZcuLjmVyiGHeD3s= Date: Thu, 14 May 2020 18:39:47 +0200 From: Borislav Petkov To: Mathieu Desnoyers Cc: Thomas Gleixner , linux-kernel , x86 , paulmck , Andy Lutomirski , Alexandre Chartre , Frederic Weisbecker , Paolo Bonzini , Sean Christopherson , Masami Hiramatsu , Petr Mladek , rostedt , "Joel Fernandes, Google" , Boris Ostrovsky , Juergen Gross , Brian Gerst , Josh Poimboeuf , Will Deacon , Peter Zijlstra , Tony Luck Subject: Re: [patch V4 part 1 29/36] x86/mce: Send #MC singal from task work Message-ID: <20200514163947.GF9266@zn.tnic> References: <20200505131602.633487962@linutronix.de> <20200505134100.957390899@linutronix.de> <20200514141703.GD9266@zn.tnic> <1278452779.21179.1589472210183.JavaMail.zimbra@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1278452779.21179.1589472210183.JavaMail.zimbra@efficios.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 14, 2020 at 12:03:30PM -0400, Mathieu Desnoyers wrote: > - #MC triggered, queuing task work, > - unrelated signal happens to be delivered to task, > - exit to usermode loop handles do_signal first, > - then it runs task work. How can that even happen? exit_to_usermode_loop->do_signal->get_signal and that does: if (unlikely(current->task_works)) task_work_run(); at the top. So the task work will always run before the signal handler. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette