]> git.baikalelectronics.ru Git - kernel.git/commitdiff
h8300: Fix build errors from do_exit() to make_task_dead() transition
authorNathan Chancellor <nathan@kernel.org>
Thu, 2 Feb 2023 04:42:45 +0000 (20:42 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Feb 2023 06:52:49 +0000 (07:52 +0100)
commit 3957214e14bb80ddfaebca843549f45bae66212b 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: e60b6fffca7b ("exit: Add and use make_task_dead.")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lkml.kernel.org/r/20211227184851.2297759-3-nathan@kernel.org
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/h8300/kernel/traps.c
arch/h8300/mm/fault.c

index a284c126f07a67938c916134adf5fa08d4e8b034..090adaee4b84c3d15d78d3024cd45ac718ab8c94 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/types.h>
 #include <linux/sched.h>
 #include <linux/sched/debug.h>
+#include <linux/sched/task.h>
 #include <linux/mm_types.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
@@ -110,7 +111,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;
index a8d8fc63780e4989b280ea7341d365bf71038a1c..573825c3cb708f315ff9affc9b21156ee1afe820 100644 (file)
@@ -52,7 +52,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;
 }