linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] sched: mark do_group_exit() as noreturn
Date: Thu, 15 Jul 2021 00:21:49 +0300	[thread overview]
Message-ID: <YO9VbRoMnaOgqGbu@localhost.localdomain> (raw)

do_group_exit() calls do_exit() which doesn't return.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 include/linux/sched/task.h |    2 +-
 kernel/exit.c              |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

--- a/include/linux/sched/task.h
+++ b/include/linux/sched/task.h
@@ -77,7 +77,7 @@ static inline void exit_thread(struct task_struct *tsk)
 {
 }
 #endif
-extern void do_group_exit(int);
+__noreturn void do_group_exit(int);
 
 extern void exit_files(struct task_struct *);
 extern void exit_itimers(struct signal_struct *);
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -895,8 +895,8 @@ SYSCALL_DEFINE1(exit, int, error_code)
  * Take down every thread in the group.  This is called by fatal signals
  * as well as by sys_exit_group (below).
  */
-void
-do_group_exit(int exit_code)
+__noreturn
+void do_group_exit(int exit_code)
 {
 	struct signal_struct *sig = current->signal;
 

                 reply	other threads:[~2021-07-14 21:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YO9VbRoMnaOgqGbu@localhost.localdomain \
    --to=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH] sched: mark do_group_exit() as noreturn' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox