mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Wander Lairson Costa <wander@redhat.com>
Cc: "Christian Brauner (Microsoft)" <brauner@kernel.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Mike Christie <michael.christie@oracle.com>,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	Oleg Nesterov <oleg@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Liam R. Howlett" <Liam.Howlett@oracle.com>,
	Suren Baghdasaryan <surenb@google.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Andrei Vagin <avagin@gmail.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	open list <linux-kernel@vger.kernel.org>,
	Hu Chunyu <chuhu@redhat.com>,
	Valentin Schneider <vschneid@redhat.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Paul McKenney <paulmck@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Luis Goncalves <lgoncalv@redhat.com>
Subject: Re: [PATCH v10 0/2] kernel/fork: beware of __put_task_struct calling context
Date: Mon, 19 Jun 2023 13:07:00 +0200	[thread overview]
Message-ID: <20230619110700.GM4253@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20230614122323.37957-1-wander@redhat.com>

On Wed, Jun 14, 2023 at 09:23:20AM -0300, Wander Lairson Costa wrote:
> Under PREEMPT_RT, __put_task_struct() indirectly acquires sleeping
> locks. Therefore, it can't be called from an non-preemptible context.
> 
> Instead of calling __put_task_struct() directly, we defer it using
> call_rcu(). A more natural approach would use a workqueue, but since
> in PREEMPT_RT, we can't allocate dynamic memory from atomic context,
> the code would become more complex because we would need to put the
> work_struct instance in the task_struct and initialize it when we
> allocate a new task_struct.

> 
> Wander Lairson Costa (2):
>   kernel/fork: beware of __put_task_struct calling context
>   sched: avoid false lockdep splat in put_task_struct()

Thanks!

      parent reply	other threads:[~2023-06-19 11:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14 12:23 Wander Lairson Costa
2023-06-14 12:23 ` [PATCH v10 1/2] " Wander Lairson Costa
2023-07-17 12:56   ` [tip: sched/core] kernel/fork: beware of __put_task_struct() " tip-bot2 for Wander Lairson Costa
2023-06-14 12:23 ` [PATCH v10 2/2] sched: avoid false lockdep splat in put_task_struct() Wander Lairson Costa
2023-07-17 12:56   ` [tip: sched/core] " tip-bot2 for Wander Lairson Costa
2023-06-19 11:07 ` Peter Zijlstra [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=20230619110700.GM4253@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=avagin@gmail.com \
    --cc=bigeasy@linutronix.de \
    --cc=brauner@kernel.org \
    --cc=chuhu@redhat.com \
    --cc=lgoncalv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=michael.christie@oracle.com \
    --cc=mst@redhat.com \
    --cc=npiggin@gmail.com \
    --cc=oleg@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=surenb@google.com \
    --cc=vschneid@redhat.com \
    --cc=wander@redhat.com \
    --cc=wangkefeng.wang@huawei.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®