mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Babanpreet Singh <bbnpreetsingh@gmail.com>,
	Christian Brauner <brauner@kernel.org>,
	Pavel Tikhomirov <ptikhomirov@virtuozzo.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	syzbot+c382ee653fd70f5cf1bb@syzkaller.appspotmail.com
Subject: Re: [PATCH] pid: use READ_ONCE() in pid_alive()
Date: Mon, 5 Oct 2026 19:46:55 +0100	[thread overview]
Message-ID: <20261005194655.18e8d3a2@pumpkin> (raw)
In-Reply-To: <asO8TiCfByNjBHWK@redhat.com>

On Mon, 5 Oct 2026 17:03:42 +0200
Oleg Nesterov <oleg@redhat.com> wrote:

> On 10/04, David Laight wrote:
...
> > If the 'add code' all the readers and have to hold the lock then does that
> > leave anything other than task exit doing an rcu-delete.
> > I wouldn't have though acquiring the lock in the task exit code would
> > be noticeable.  
> 
> Still can't understand. The exiting task does take tasklist when it calls
> detach_pid().

I think I've confused myself :-)
The delete needs the lock to avoid corrupting the list.
It would be safe for an rcu protected reader - but it doesn't help you.

David

      reply	other threads:[~2026-10-05 18:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02  1:21 Babanpreet Singh
2026-10-02  6:33 ` Bradley Morgan
2026-10-02 11:59 ` Oleg Nesterov
2026-10-03 17:22 ` David Laight
2026-10-04 10:55   ` Oleg Nesterov
2026-10-04 11:11     ` Oleg Nesterov
2026-10-04 11:51     ` David Laight
2026-10-04 13:14       ` Oleg Nesterov
2026-10-04 13:31         ` David Laight
2026-10-05 15:03           ` Oleg Nesterov
2026-10-05 18:46             ` David Laight [this message]

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=20261005194655.18e8d3a2@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bbnpreetsingh@gmail.com \
    --cc=brauner@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=ptikhomirov@virtuozzo.com \
    --cc=syzbot+c382ee653fd70f5cf1bb@syzkaller.appspotmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®