lkml.org 
[lkml]   [2022]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/9] signal: Always call do_notify_parent_cldstop with siglock held
On Tue, Apr 26, 2022 at 05:52:08PM -0500, Eric W. Biederman wrote:
> Now that siglock keeps tsk->parent and tsk->real_parent constant
> require that do_notify_parent_cldstop is called with tsk->siglock held
> instead of the tasklist_lock.
>
> As all of the callers of do_notify_parent_cldstop had to drop the
> siglock and take tasklist_lock this simplifies all of it's callers.
>
> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
> ---
> kernel/signal.c | 156 +++++++++++++++++-------------------------------
> 1 file changed, 55 insertions(+), 101 deletions(-)
>
> diff --git a/kernel/signal.c b/kernel/signal.c
> index 72d96614effc..584d67deb3cb 100644
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -2121,11 +2121,13 @@ static void do_notify_parent_cldstop(struct task_struct *tsk,
> bool for_ptracer, int why)
> {
> struct kernel_siginfo info;
> - unsigned long flags;
> struct task_struct *parent;
> struct sighand_struct *sighand;
> + bool lock;
> u64 utime, stime;
>
> + assert_spin_locked(&tsk->sighand->siglock);

lockdep_assert_held() please...

\
 
 \ /
  Last update: 2022-04-28 12:39    [W:0.620 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site