Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6344557pxb; Mon, 8 Nov 2021 07:08:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJz6zEdfkHnI60evkpo+k8bFTiH2U9fMMNj4Sz3qdij/o8ThCbmvA39PoKYT1Ykh9wZ/hQd0 X-Received: by 2002:a05:6402:5216:: with SMTP id s22mr303584edd.291.1636384138924; Mon, 08 Nov 2021 07:08:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636384138; cv=none; d=google.com; s=arc-20160816; b=H99TWXHIt3QQIQ2IIroQ+cGz2Qm78BQ8Yzq6/LaXWOquc5ODtZo5Ff3R51wSWLYaM1 mBVfrY2zcooW6dJf3qjJZGxcefLt0msQXaftji4juLMf2lUkmTJ4+9M9gCROx3/5Rnkm y4y6RvmXYw2mFXUeGwiHB5OCWrRy54pKNcNhMFvo/gr/VkjFL+OXC498yhKXGoK2l5CR x4EcTX4ZwG8f0rLOcjOulluu6TMzX8Nwe4OzYJadRbtErzmFcXY76eLYxSFxHYT3K1lL cDfegHewB5oFmJvLRnb4IMiMN4LnPEd0paROWcqNnE9rcPnOGFH18Vi35CWBz4AVk2d1 OTtA== 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:to:from :dkim-signature; bh=O4l6NvOfwI35aQ1VkPm6SxCKClITle3M6ZNdjdLIRBg=; b=ffVrSd4in5I0BMOsZeLckIMYVIXLkqkCuMqR/e2AdGxZD7ptaPawLWuTh14rSZMOBe 4z42T6iQJWDfokUqkHbqfvfVw4vQiLOqjHjQ2e2/1SMf5P9gZJNHSH8r/RCgFaZ2lURN K6q28EbR8mJsuYuYR6zFMWmEFwwZnPy6r7D8biiXmzLIAJnWl+fecX2nIFl3fZ+M1Y9N O13E1J/oKeAB+7W5G6lBBzfEL+mynxibMEvN4U9HYFijxTqQ4uc/TZbPl2nM9sOYWNn4 4p3irmvqeR+phbEpKkeSHZ8RkMLVgMFi25pgVIjNVv9a0KWLtYyXEEIR6U/4dkBCkLUe iYkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=WSpP5u0c; 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 a20si33239933edj.610.2021.11.08.07.08.34; Mon, 08 Nov 2021 07:08:58 -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=WSpP5u0c; 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 S239004AbhKHKSj (ORCPT + 99 others); Mon, 8 Nov 2021 05:18:39 -0500 Received: from mail.skyhub.de ([5.9.137.197]:38352 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230201AbhKHKPI (ORCPT ); Mon, 8 Nov 2021 05:15:08 -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 5327A1EC04E0; Mon, 8 Nov 2021 11:12:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1636366343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O4l6NvOfwI35aQ1VkPm6SxCKClITle3M6ZNdjdLIRBg=; b=WSpP5u0cMlmbvkpd/yxn2hLFcYASp5SC08SldoBh9vaf2jd4B42EPJdAiRV0Kk56CXj8g+ mjLhn8Fnh/UqmPkKRyzReH8owa8MQeATtQYTxR4DExrxXy4/CClIdOBnfs5WIwExf4LMlp 8SBu+OcAl+XApStMqJHw8bnjCXxe68M= From: Borislav Petkov To: LKML Subject: [PATCH v0 19/42] kernel/hung_task: Check notifier registration return value Date: Mon, 8 Nov 2021 11:11:34 +0100 Message-Id: <20211108101157.15189-20-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 --- kernel/hung_task.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/hung_task.c b/kernel/hung_task.c index 9888e2bc8c76..8e3bb95968a4 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c @@ -304,7 +304,8 @@ static int watchdog(void *dummy) static int __init hung_task_init(void) { - atomic_notifier_chain_register(&panic_notifier_list, &panic_block); + if (atomic_notifier_chain_register(&panic_notifier_list, &panic_block)) + pr_warn("Hung task notifier already registered\n"); /* Disable hung task detector on suspend */ pm_notifier(hungtask_pm_notify, 0); -- 2.29.2