lkml.org 
[lkml]   [2023]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.15 09/20] h8300: Fix build errors from do_exit() to make_task_dead() transition
    Date
    From: Nathan Chancellor <nathan@kernel.org>

    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 <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>
    ---
    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 <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>
    @@ -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;
    }
    --
    2.39.1
    \
     
     \ /
      Last update: 2023-03-26 23:54    [W:4.037 / U:0.408 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site