All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Bradley Morgan <brads@mainlining.org>
Cc: mm-commits@vger.kernel.org, oleg@redhat.com, bsingharora@gmail.com
Subject: Re: [to-be-updated] taskstats-copy-signal-stats-under-siglock-in-taskstats_exit.patch removed from -mm tree
Date: Wed, 7 Oct 2026 10:54:52 -0700	[thread overview]
Message-ID: <20261007105452.a5c7327cc595a4820bf80e73@linux-foundation.org> (raw)
In-Reply-To: <A2B94D8E-F026-406E-B346-9200FA081EB0@mainlining.org>

On Wed, 07 Oct 2026 18:19:50 +0100 Bradley Morgan <brads@mainlining.org> wrote:

> >
> >From 137b873cce7721384c9d24f4c0864bb002c8d039 Mon Sep 17 00:00:00 2001
> From: Bradley Morgan <include@grrlz.net>
> Date: Tue, 4 Aug 2026 09:34:00 +0000
> Subject: [PATCH v2] taskstats: copy signal->stats under siglock in
>  taskstats_exit

Thanks.  Please send as a standalone email and cc linux-kernel?  So we
get a nice Link: in the permanent record.  (mm-commits Links: work
though).

> --- a/kernel/taskstats.c
> +++ b/kernel/taskstats.c
> @@ -635,7 +635,10 @@ void taskstats_exit(struct task_struct *tsk, int group_dead)
>  	if (!stats)
>  		goto err;
>  
> +	/* This was racy before, copy the stats under siglock. */

That's not a great comment - we're really not interested in what is
essentially embedded changelogging.

A good comment would explain *why* we're taking the lock.  Briefly
describe what we're excluding against.

> +	spin_lock_irq(&tsk->sighand->siglock);
>  	memcpy(stats, tsk->signal->stats, sizeof(*stats));
> +	spin_unlock_irq(&tsk->sighand->siglock);
>  	stats->version = TASKSTATS_VERSION;


  reply	other threads:[~2026-10-07 17:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07  1:21 [to-be-updated] taskstats-copy-signal-stats-under-siglock-in-taskstats_exit.patch removed from -mm tree Andrew Morton
2026-10-07  6:39 ` Bradley Morgan
2026-10-07 17:12   ` Andrew Morton
2026-10-07 17:19     ` Bradley Morgan
2026-10-07 17:54       ` Andrew Morton [this message]
2026-10-07 18:06       ` 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=20261007105452.a5c7327cc595a4820bf80e73@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=brads@mainlining.org \
    --cc=bsingharora@gmail.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=oleg@redhat.com \
    /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.