All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: mm-commits@vger.kernel.org, bsingharora@gmail.com, include@grrlz.net
Subject: Re: + taskstats-copy-signal-stats-under-siglock-in-taskstats_exit.patch added to mm-nonmm-unstable branch
Date: Tue, 4 Aug 2026 22:39:23 +0200	[thread overview]
Message-ID: <anJN-w0et3CXG64B@redhat.com> (raw)
In-Reply-To: <20260804200407.E858F1F000E9@smtp.kernel.org>

On 08/04, Andrew Morton wrote:
>
> From: Bradley Morgan <include@grrlz.net>
> Subject: taskstats: copy signal->stats under siglock in taskstats_exit

...

> --- a/kernel/taskstats.c~taskstats-copy-signal-stats-under-siglock-in-taskstats_exit
> +++ a/kernel/taskstats.c
> @@ -590,6 +590,7 @@ void taskstats_exit(struct task_struct *
>  	struct sk_buff *rep_skb;
>  	size_t size;
>  	int is_thread_group;
> +	unsigned long flags;
>  
>  	if (!family_registered)
>  		return;
> @@ -635,7 +636,10 @@ void taskstats_exit(struct task_struct *
>  	if (!stats)
>  		goto err;
>  
> +	/* This was racy before, copy the stats under siglock. */
> +	spin_lock_irqsave(&tsk->sighand->siglock, flags);

Why _irqsave? The only caller is do_exit(), and it obviously runs with
irqs enabled?

Oleg.


  reply	other threads:[~2026-08-04 20:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 20:04 + taskstats-copy-signal-stats-under-siglock-in-taskstats_exit.patch added to mm-nonmm-unstable branch Andrew Morton
2026-08-04 20:39 ` Oleg Nesterov [this message]
2026-08-04 20:53   ` Bradley Morgan
2026-08-05  9:31     ` Oleg Nesterov

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=anJN-w0et3CXG64B@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bsingharora@gmail.com \
    --cc=include@grrlz.net \
    --cc=mm-commits@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.