From patchwork Tue Jan 24 18:50:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 13114569 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12DDFC54E94 for ; Tue, 24 Jan 2023 18:52:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234322AbjAXSwi (ORCPT ); Tue, 24 Jan 2023 13:52:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234194AbjAXSw0 (ORCPT ); Tue, 24 Jan 2023 13:52:26 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA1A04609D; Tue, 24 Jan 2023 10:52:09 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 459B4CE0E11; Tue, 24 Jan 2023 18:52:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3FE47C433EF; Tue, 24 Jan 2023 18:52:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674586326; bh=pCEZoYPkgp7l8iruCPKNi4PqYvgj1pEBIkBY310sT6g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c4Ln8OAqe1Ot1EbIajSILw67/X0mGUxD4NiE1u9827xvIcUDfIIdNOijnfomRcZlr Gv0NAp0X+AuWoswUDleTSFpk6NVH6R42G3SmdX9JQ1jq4fDD4bEFlxEt8vhJHikX4r J4jFNSllRt7qtYYiZZBVUlFDI3TFV9tss7wW3r5pl3W1HxMNIvFb0vJ61ynXxQ0D1D 2VbnQbk61msSW54jL/7dcEBMT5fbXMFoyCeNBlayfMxKrtC5aJiTBlJFsqvlU9Cv3u 8QbemyBRJ32HJZ/EADVzSZFAZKp/o/uZKM9Ez+Q5/Rk93yXMCtdTpJmzf94oNi/rY4 uzYNf52MIR1Tw== From: Eric Biggers To: stable@vger.kernel.org, Greg Kroah-Hartman Cc: Kees Cook , SeongJae Park , Seth Jenkins , Jann Horn , "Eric W . Biederman" , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Nathan Chancellor Subject: [PATCH 5.15 09/20] h8300: Fix build errors from do_exit() to make_task_dead() transition Date: Tue, 24 Jan 2023 10:50:59 -0800 Message-Id: <20230124185110.143857-10-ebiggers@kernel.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230124185110.143857-1-ebiggers@kernel.org> References: <20230124185110.143857-1-ebiggers@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-hardening@vger.kernel.org From: Nathan Chancellor commit ab4ababdf77ccc56c7301c751dff49c79709c51c upstream. When building ARCH=h8300 defconfig: arch/h8300/kernel/traps.c: In function 'die': arch/h8300/kernel/traps.c:109:2: error: implicit declaration of function 'make_dead_task' [-Werror=implicit-function-declaration] 109 | make_dead_task(SIGSEGV); | ^~~~~~~~~~~~~~ arch/h8300/mm/fault.c: In function 'do_page_fault': arch/h8300/mm/fault.c:54:2: error: implicit declaration of function 'make_dead_task' [-Werror=implicit-function-declaration] 54 | make_dead_task(SIGKILL); | ^~~~~~~~~~~~~~ The function's name is make_task_dead(), change it so there is no more build error. Additionally, include linux/sched/task.h in arch/h8300/kernel/traps.c to avoid the same error because do_exit()'s declaration is in kernel.h but make_task_dead()'s is in task.h, which is not included in traps.c. Fixes: 0e25498f8cd4 ("exit: Add and use make_task_dead.") Signed-off-by: Nathan Chancellor Link: https://lkml.kernel.org/r/20211227184851.2297759-3-nathan@kernel.org Signed-off-by: Eric W. Biederman Signed-off-by: Eric Biggers --- arch/h8300/kernel/traps.c | 3 ++- arch/h8300/mm/fault.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/h8300/kernel/traps.c b/arch/h8300/kernel/traps.c index 3d4e0bde37ae7..a92c39e03802e 100644 --- a/arch/h8300/kernel/traps.c +++ b/arch/h8300/kernel/traps.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -106,7 +107,7 @@ void die(const char *str, struct pt_regs *fp, unsigned long err) dump(fp); spin_unlock_irq(&die_lock); - make_dead_task(SIGSEGV); + make_task_dead(SIGSEGV); } static int kstack_depth_to_print = 24; diff --git a/arch/h8300/mm/fault.c b/arch/h8300/mm/fault.c index 0223528565dd3..b465441f490df 100644 --- a/arch/h8300/mm/fault.c +++ b/arch/h8300/mm/fault.c @@ -51,7 +51,7 @@ asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address, printk(" at virtual address %08lx\n", address); if (!user_mode(regs)) die("Oops", regs, error_code); - make_dead_task(SIGKILL); + make_task_dead(SIGKILL); return 1; }