From patchwork Fri Nov 3 14:05:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 117903 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp3357854edm; Fri, 3 Nov 2017 07:06:49 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TZvRcDhJx1lO3enf9/FoTM3SGfDlSmRAB4zFWN6nHEFmRuxYSyMjfr2xTx+OWVXSPmd/ji X-Received: by 10.98.210.5 with SMTP id c5mr7850848pfg.181.1509718009679; Fri, 03 Nov 2017 07:06:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509718009; cv=none; d=google.com; s=arc-20160816; b=fCBK32/2DNuP8yHCXTDkdtDGh/lgWLWch5DiPnPxkvz8Rci59dKNnaeTs9DP2ceIuy esTDJbmql02LM4ceXTYgL4NlnwZC2exc/IuuQ071gODfuzz9VBhsLXHkilpPSv6zal4b Hm3bLPPy1RQWpaCPqWI8sHmnoVO7HOzVqw/CP0249ghKAIfOlAG1fIqAqMcNHDCUsZKt guO33HRt/anS7KajV6BtBMechjRUjmRgdfEa61JOatvDH2LMATV3uYrHtZw7eKePQmR2 dRoh5axzYmTCUg1wjSbm2ADW9rwnBcboShNb6zwrbkp+RE69rimjys+tYAvHjsmDwCEc 4Rnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=9zh1idQgCc5hjceNC7p7Y5OGX8g9XLbNJusJ8NYns0o=; b=z1/UcZBmbmEOag0nZgBs53ByUo6P7gyQCisPWjYjcVlF/skg3gQleJ/UVQ2bS6N+hA TXzo2MiPSha3zrnjzblXYw7B/HZ4aLsPAFA6emUEPQb+Fvbekq6fXTbJ8GMlYaCdoigO uJd9eaWVx8VMSL58Xj5NKjYUXZJU4P445EIMaPluAsnZCyCJR5KKIvOrr25BOafc7Dh0 XoG/M7tbUpEsH3ezlnRbZCjpEHqPozH5okUXN8x7YvJwTExcxeU65eSvAHYLjKqfQFml Dul6ZgE7G6mH/KL3xFXyhuPPW9n2/YeXbS5PMGVY3DcH99qwu3xzT1I/kz1UnvN+2AIz +Jzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 70si4976323plc.774.2017.11.03.07.06.49; Fri, 03 Nov 2017 07:06:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756318AbdKCOGq (ORCPT + 26 others); Fri, 3 Nov 2017 10:06:46 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:51039 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756195AbdKCOGp (ORCPT ); Fri, 3 Nov 2017 10:06:45 -0400 Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0MPt6U-1e6kip2jEA-004zYE; Fri, 03 Nov 2017 15:06:09 +0100 From: Arnd Bergmann To: Andrew Morton Cc: Arnd Bergmann , Ingo Molnar , Peter Zijlstra , Kate Stewart , Greg Kroah-Hartman , Andi Kleen , linux-kernel@vger.kernel.org Subject: [PATCH] kernel debug: fix building without modules Date: Fri, 3 Nov 2017 15:05:46 +0100 Message-Id: <20171103140606.707333-1-arnd@arndb.de>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IDkO7YwJ5pVWSGvZY3Qg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The new generic_bug_clear_once() function fails to build when modules are disabled: lib/bug.c: In function 'generic_bug_clear_once': lib/bug.c:213:32: error: 'module_bug_list' undeclared (first use in this function); did you mean 'module_sig_ok'? list_for_each_entry_rcu(mod, &module_bug_list, bug_list) This adds another #ifdef around the code that resets the counters in modules. Fixes: 371435f78e9e ("kernel debug: support resetting WARN_ONCE for all architectures") Signed-off-by: Arnd Bergmann --- lib/bug.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.0 diff --git a/lib/bug.c b/lib/bug.c index fa9c901fabf4..c988a3fc3348 100644 --- a/lib/bug.c +++ b/lib/bug.c @@ -207,6 +207,7 @@ static void clear_once_table(struct bug_entry *start, struct bug_entry *end) void generic_bug_clear_once(void) { +#ifdef CONFIG_MODULES struct module *mod; rcu_read_lock_sched(); @@ -214,6 +215,7 @@ void generic_bug_clear_once(void) clear_once_table(mod->bug_table, mod->bug_table + mod->num_bugs); rcu_read_unlock_sched(); +#endif clear_once_table(__start___bug_table, __stop___bug_table); }