Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6253713pxb; Mon, 8 Nov 2021 05:46:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJy6C+jDXvyPotHyQzGBJSCSxISp5JMxPQNFMqJd387WPhEzVurTMfDO1g7Fn6zymKStIo9+ X-Received: by 2002:a50:e041:: with SMTP id g1mr106316945edl.4.1636379205940; Mon, 08 Nov 2021 05:46:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636379205; cv=none; d=google.com; s=arc-20160816; b=zCdoxlAU0Bp8qe3knDy5rWnNYxTDOxpMi96OZ0mnHvSy2oJ6Uqwx+1hv8dSzygoiu4 HW6rSO2V524S8F5Y1LBIE8Cdx1IT482SqDO3vPjgB0uK39rufoTYd0M45y7h/VXk7rfB tL6sO3Hq0byUJJMGxA8HhcdyLgF62Qg+KlKpsnrQF8p4NVjijwdd2nyPwOp+iLkRrvW+ xFsDFS5Rds+pqrvINX5YGqdVRt4sluhtF858Cy46wuM1yuLveNE4vyV5vRccJzM0zB0+ AW0YJI8/e1YqeGD362ydzdgTLWf+0AmAK0WWC+0jkVxs83sh/e7kZtrhI5+IvGGyXIwQ 9PzA== 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=ZrcRCvECKj7IKUT0HhuHkcjgG9gjdsthfkW1xcjqiQQ=; b=ijgX+IcH+FP2ovPKiTv4LP67XwEQPjPC/O48bn86i5KDAgQ3WqJcaPe1Kli0sLphIS JSDKoAZ84Bay8nIhhnuLBn8AJbYYSLqDn8zw2jw8SXhJgxEp+2U/cdxRmJu//u6UBCK1 9ID1vj1X/zNwVzVAzwRaHzHJTKS9fh1iu2uWPZcusfJlcgc50KDvHF7NhM37Vk7/bEII 1mSyky4j/yugQtljCkATVhWaYhkWcVxMJe54CiKtt7VbEy12QWQEmR7UfMSHtwOAOYV6 Cqh+jQu8108ods+t1KiTGF6hV9mK9EWH0j5EXS6+Wu7g5RsswKPDmP1IebZtS3MWyC2U Q1lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="Bry7kjH/"; 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 do22si8259271ejc.724.2021.11.08.05.46.19; Mon, 08 Nov 2021 05:46:45 -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="Bry7kjH/"; 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 S238857AbhKHKTH (ORCPT + 99 others); Mon, 8 Nov 2021 05:19:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238632AbhKHKPg (ORCPT ); Mon, 8 Nov 2021 05:15:36 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72B46C06120C for ; Mon, 8 Nov 2021 02:12:32 -0800 (PST) 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 117821EC051F; Mon, 8 Nov 2021 11:12:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1636366351; 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=ZrcRCvECKj7IKUT0HhuHkcjgG9gjdsthfkW1xcjqiQQ=; b=Bry7kjH/QPnC8+/1Xd35kNkpMnozd5dqVjBxpEJhFQos8IwQXvKbX5GfwlRbJOwjjNWHuN cy1YdUgsC+vuiCb5tv2y4EgPfGNdUovYo7RznunEwaImVg/xycVcfO6RgLRcz+j5NLy4aZ ttYPmlYm9OJYwZrmbpqI/hS5S/0F8RQ= From: Borislav Petkov To: LKML Cc: linux-arm-kernel@lists.infradead.org Subject: [PATCH v0 29/42] arm64: Check notifier registration return value Date: Mon, 8 Nov 2021 11:11:44 +0100 Message-Id: <20211108101157.15189-30-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: linux-arm-kernel@lists.infradead.org --- arch/arm64/kernel/setup.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index be5f85b0a24d..e66af9de7cd7 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -440,8 +440,10 @@ static struct notifier_block arm64_panic_block = { static int __init register_arm64_panic_block(void) { - atomic_notifier_chain_register(&panic_notifier_list, - &arm64_panic_block); + if (atomic_notifier_chain_register(&panic_notifier_list, + &arm64_panic_block)) + pr_warn("Panic notifier already registered\n"); + return 0; } device_initcall(register_arm64_panic_block); -- 2.29.2