Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6344611pxb; Mon, 8 Nov 2021 07:09:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxaIjnMyNZhZM3qHWBM4IsBiO9jGnFJOnau58uqFKz6fTjN0Vm7tUmcOuimy0enjK9L8YMc X-Received: by 2002:a50:da0a:: with SMTP id z10mr351210edj.298.1636384140927; Mon, 08 Nov 2021 07:09:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636384140; cv=none; d=google.com; s=arc-20160816; b=XqTS9uUXd8ux86HjMmdldg5JAZAYPfQ00Zsau/zbnrUX9vK+k557+9/rFfa9g/Af5T Q8W+9CQb+UBZfTkzuA1EH2Mzy48yKXKneTBLOXLPxXFJn2N0qalebSTu0TwjzqQ0E8TR EWgI11evojwzU1A22Mp7eDkD7sPPqGCsCK5Uy477bLcIFyowhZj0eFjJMXT0HdpPKCyt DxcHP/iTRFxdpD9tPHNJirfg++i9M5TvTo5HjxWEuy6wf0JlT/9CoWMTXXYjWVRlIYCL AVr7z4XubfW4grsf6AeyVlA9rX6mpIYC78sb/DBIvg8ZB7zDA3aNBIUbjj4KAGhqu4rO c1Ng== 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=LsTDYXG+v5hhPMnmRg9TduaPXosuJr3o/692DyLaWe4=; b=H+iSbgK21kbgpa8ahTH0nrdEaHA2bpjM3Kp6smkLswConR10yYDnbhNomJYjaG/q+l EWROyh3gCSqoLeAx0yPApYlvT5msV3f7xbQ+HRyZGXCk9DQcXtXVgE28/7lnytq6nwRO lxgXslJ7YZi3Kz6Roy9+ySjNoan/1k2VCJyLYz6/AX2VwrdyXG2LpshwXI7ChME/uFzN PFxts9Q0uqTE6XcXmx9WtFsru0ixnoz+zfZIy5l2+2/nCFZUsGyxnJ+MCHXyOp+NDVM4 dqjydn5oAoHU6ES8QIxbCxAFp8D82vj2L21P1v4cfcRSwJGxVTm05IRDGZwENmunjEdg jkfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=nKVAoOqA; 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 he34si10542367ejc.421.2021.11.08.07.08.34; Mon, 08 Nov 2021 07:09:00 -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=nKVAoOqA; 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 S238825AbhKHKSJ (ORCPT + 99 others); Mon, 8 Nov 2021 05:18:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238569AbhKHKPL (ORCPT ); Mon, 8 Nov 2021 05:15:11 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 315F1C0613B9 for ; Mon, 8 Nov 2021 02:12:26 -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 C5F751EC0512; Mon, 8 Nov 2021 11:12:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1636366344; 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=LsTDYXG+v5hhPMnmRg9TduaPXosuJr3o/692DyLaWe4=; b=nKVAoOqArxTd9eNlc15GoKXKFEtlvlVU5qRmJCeTzgQ9RnumWDj8qNjyVkPBQZlRa9gZRC t8KzKBUGXcK18fiH8mAlba7UbSmuGpOBgeYIBJ9JUSuWW/z84VhQJbj0L3GRjWvgLW6hGC ywZG6v2GExcT9ij1ZUvjpd6jugjwVFc= From: Borislav Petkov To: LKML Cc: Steven Rostedt Subject: [PATCH v0 21/42] tracing: Check notifier registration return value Date: Mon, 8 Nov 2021 11:11:36 +0100 Message-Id: <20211108101157.15189-22-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: Steven Rostedt --- kernel/trace/trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index f9139dc1262c..87fd6f1fa407 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -10064,8 +10064,8 @@ __init static int tracer_alloc_buffers(void) /* All seems OK, enable tracing */ tracing_disabled = 0; - atomic_notifier_chain_register(&panic_notifier_list, - &trace_panic_notifier); + if (atomic_notifier_chain_register(&panic_notifier_list, &trace_panic_notifier)) + pr_warn("Trace panic notifier already registered\n"); register_die_notifier(&trace_die_notifier); -- 2.29.2