Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6335847pxb; Mon, 8 Nov 2021 07:01:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVktOzKdGgfys0WkrX5FZ9Ipt3R6EtPYYXRSvrVdnbljhBBNCgThChisGP/P2N7B8cuHgh X-Received: by 2002:a92:cb4e:: with SMTP id f14mr386361ilq.109.1636383713480; Mon, 08 Nov 2021 07:01:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636383713; cv=none; d=google.com; s=arc-20160816; b=cUwcOSDtpcQE9WMZU8aoMdICuYkBn4gHnHNAj0ENMVFnZQP8unr1zZCtnZ05IzTJde FnGB82dRO51aShtOIDSRGNvc2l9RIiv/3MNHL3OzOqDJq1gf51xKcwPSTSk0xmEo+/ma T7Ris5AjxTIEcsvSkYSlGVNm3VDnCERoiG5bbN+RPLN/b60j3Ch1bbpBpXBTcr2xMLyw o7bn22/Ys1j58VBcF9TdWxz68ol121GweWJotCp4TvnOsYaHFPenGWTZVzuE9XPL4sCj zOv+cLOS10qS9Rs+naEpti+/3hPmdvdZPT4C9CAv0qy9nCDBTX9ItABScuk3T6Szh1tv w/WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=grdSLe+txR+qPcky5ijEGsjPCSkRE9m2uQKOXesimzE=; b=uGD3D8LlYqozYsjiVPG7hw06uOBJguy2VQIFkrWVf51pia8uomc5GCoJAG6K/imE9X wx6HIGyI6qH/akjBYD+0qr1wa9a+ONvIJB5y2Vea90lZeVlQmFgKqbaogCm3eZqtz6N+ qojvP2siGxvzAMJguZ1xToNTHn334eYBEbCQ6zfcknkMX+lo5aMlXHfGYBszS6gQLoNS OyZ8gTEe20f6CJE8epnH4/aJgmifFWjzuvvnBv5gY3mhREZscv69Za997YcNEqiYHWBz ycGpLvAXyj4JGTzNrOh5fiZ4ffJJirw/qUh4YSMG0FzT/8mHdLiAv9d07KmyQXreTpri qXBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=OveTWrDz; 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 g3si30647626ile.19.2021.11.08.07.01.40; Mon, 08 Nov 2021 07:01:53 -0800 (PST) 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=OveTWrDz; 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 S231910AbhKHKO4 (ORCPT + 99 others); Mon, 8 Nov 2021 05:14:56 -0500 Received: from mail.skyhub.de ([5.9.137.197]:38202 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230462AbhKHKOy (ORCPT ); Mon, 8 Nov 2021 05:14:54 -0500 Received: from zn.tnic (p200300ec2f33110088892b77bd117736.dip0.t-ipconnect.de [IPv6:2003:ec:2f33:1100:8889:2b77:bd11:7736]) (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 BABC81EC04E0; Mon, 8 Nov 2021 11:12:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1636366329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=grdSLe+txR+qPcky5ijEGsjPCSkRE9m2uQKOXesimzE=; b=OveTWrDzAdrOoSEwa1Av97jBWR5pZb8d7IM/QcE2Bm0tLy+LKZctYgVNu/8HPp+khPKy8S fBJxFCpTfhDSa0lqOVDygpDhEY+AGd64/coDHahUOeAP4LgJ5PPdM1pvgt1eBYUTFfAiTM J8ofTFwzerbk/CRlwmeCnSLXSqeLzqY= From: Borislav Petkov To: LKML Cc: xen-devel@lists.xenproject.org Subject: [PATCH v0 02/42] xen/x86: Check notifier registration return value Date: Mon, 8 Nov 2021 11:11:17 +0100 Message-Id: <20211108101157.15189-3-bp@alien8.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20211108101157.15189-1-bp@alien8.de> References: <20211108101157.15189-1-bp@alien8.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Borislav Petkov Avoid homegrown notifier registration checks. No functional changes. Signed-off-by: Borislav Petkov Cc: xen-devel@lists.xenproject.org --- arch/x86/xen/enlighten.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 95d970359e17..2264dd6e157f 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -354,7 +354,9 @@ static struct notifier_block xen_panic_block = { int xen_panic_handler_init(void) { - atomic_notifier_chain_register(&panic_notifier_list, &xen_panic_block); + if (atomic_notifier_chain_register(&panic_notifier_list, &xen_panic_block)) + pr_warn("Xen panic notifier already registered\n"); + return 0; } -- 2.29.2