Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp975114iob; Fri, 13 May 2022 18:16:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwY3eEVBk0NEfzQzEi6Z5mscr+NfMqsVeS4MF4CSW7Tu7dFM1uhhkhPVxzOKHdPimdqDJ/Q X-Received: by 2002:a05:600c:1f19:b0:396:e98e:35e1 with SMTP id bd25-20020a05600c1f1900b00396e98e35e1mr3979316wmb.84.1652490966954; Fri, 13 May 2022 18:16:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652490966; cv=none; d=google.com; s=arc-20160816; b=E0x2GaNRAdayXjPJuh/u1xWrUx9FQjx7WUfaiPv46yzVP8Ea7bw5ko//GbFSd6vIbe Fy2Qupm+5gOxSiMsYaUsZzoY708Vg6IeFRso/NdAq7vTlV8KMQVPvDVqvtW1EXu7RJ70 IU3Y8jrGlHuhXw0QavOgKk1mPoz1w1eFJULbConL1oRGDUd/ogkHJZV4ir8TrUkMiqcq HyijaSDLswnlayRtlQ67+qa7Py7ez86gSJV8WoiC0nd4reMwEaZSVZJcyzdSV4ar2djo ZYuI3YCzZTYVGIuAMwLqSLbYlTSaXEvPMDF0BsyN/rugsgUKBB1hRA3+c1aL1v8TLtqK jk/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=8nfbJDkowExi1rljTaUNQHjUebBun1mVwBd9QMCWbWE=; b=wjT7v1WwUPemyF7BVbxUeYPpqA1roB7nczcaEK/R9odduZLIe6L2/TrpwZrFtZ5zsB lmKt/h6nnP7Ry8MRvUYOkydh8+D679sZuf8gbCfO5T+HH9cNxwzjtDzkFItTD0Xalhfp 9aqw73yGPnU1MXtGhhg9Pq+tO98UaV2+aoTqW8T/QvF3IuBVEMdz3k2DfcqryGZcUj8E jni4xCbjqEE3czoZim/h/kEuba2gjXMNjZr6CrTmwF/k3UueozulYgQHmBKn267qQB4z ADZyUM8VmR5GpsxBCAb4DIOdTDHkp5lFKK474rpDKIrqYBK/IKpa/tiWR8ttmQ/aTYXq nMwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=4ZvXLhou; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id m17-20020a5d6251000000b0020a847d9922si3591145wrv.917.2022.05.13.18.16.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 18:16:06 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=4ZvXLhou; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C667D3AE438; Fri, 13 May 2022 16:46:42 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356101AbiELPtD (ORCPT + 99 others); Thu, 12 May 2022 11:49:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349369AbiELPtB (ORCPT ); Thu, 12 May 2022 11:49:01 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFD40C9EF1 for ; Thu, 12 May 2022 08:49:00 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1652370539; 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: in-reply-to:in-reply-to:references:references; bh=8nfbJDkowExi1rljTaUNQHjUebBun1mVwBd9QMCWbWE=; b=4ZvXLhouzuM+pVL8jFPXColxqczB43n09r5tOaOpwZa2dRcoYsPAfTUoYPsrI7OMt7Wzpk aUJHn1HvyUNcMqPxKc8rYfbUlTtvmj3DIpeGQ2e44RfDvNZT76RJkTgRzzXhLJqIi/FZH0 Fz+iknvcjQfDEMBBV9ypFeiojl2uNXFc9vz3g7WBNKHwW/9sxWQWg/NLS+Qn/PxZAhoahM IKVZ3NkaNC8UcpCdpygw6GX/o9g3bt/SgY3HyNFV6wSU4nd1sBF566tO9ODNN47Kf/DH/P IDxidfIGbIoUzAMNR6j8vhtQLh+s+0V3IBCbbDvXCdlFtWkv0uEl48/xOMjJKw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1652370539; 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: in-reply-to:in-reply-to:references:references; bh=8nfbJDkowExi1rljTaUNQHjUebBun1mVwBd9QMCWbWE=; b=BFc9RhQ2NZRYUGyLIAkcUYukUqJLvQHaIAk+cavSJd4KNhfANQA5uyfET6FFYL2/Vdu5wx 4VxQCTTlhOsaTKAw== To: Sean Christopherson Cc: Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, "Guilherme G . Piccoli" , Vitaly Kuznetsov , Paolo Bonzini Subject: Re: [PATCH 1/2] x86/crash: Disable virt in core NMI crash handler to avoid double list_add In-Reply-To: References: <20220511234332.3654455-1-seanjc@google.com> <20220511234332.3654455-2-seanjc@google.com> <87wnervxb7.ffs@tglx> Date: Thu, 12 May 2022 17:48:58 +0200 Message-ID: <87k0aqvjit.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 12 2022 at 14:14, Sean Christopherson wrote: > On Thu, May 12, 2022, Thomas Gleixner wrote: > diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c > index 4e3a839ae146..808d3e75fb2d 100644 > --- a/arch/x86/kernel/reboot.c > +++ b/arch/x86/kernel/reboot.c > @@ -896,7 +896,11 @@ void nmi_shootdown_cpus(nmi_shootdown_cb callback) > msecs--; > } > > - /* Leave the nmi callback set */ > + /* > + * Leave the nmi callback set, shootdown is a one-time thing. Clearing > + * the callback could result in a NULL pointer dereference if a CPU > + * (finally) responds after the timeout expires. > + */ Good point!