mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ravindran, Binoy" <binoy@vt.edu>
To: "Paul E. McKenney" <paulmck@kernel.org>,
	Frederic Weisbecker <frederic@kernel.org>,
	Neeraj Upadhyay <neeraj.upadhyay@kernel.org>,
	Joel Fernandes <joelagnelf@nvidia.com>,
	Josh Triplett <josh@joshtriplett.org>,
	Boqun Feng <boqun@kernel.org>,
	Uladzislau Rezki <urezki@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Zqiang <qiang.zhang@linux.dev>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	Miroslav Benes <mbenes@suse.cz>, Petr Mladek <pmladek@suse.com>,
	Joe Lawrence <joe.lawrence@redhat.com>,
	Song Liu <song@kernel.org>, Ingo Molnar <mingo@kernel.org>,
	Jiri Kosina <jikos@kernel.org>, "Ravindran, Binoy" <binoy@vt.edu>
Cc: "rcu@vger.kernel.org" <rcu@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"live-patching@vger.kernel.org" <live-patching@vger.kernel.org>,
	Yafang Shao <laoar.shao@gmail.com>,
	"Shastri, Jaidev" <jaidevshastri@vt.edu>
Subject: Re: [PATCH 0/2] livepatch: Do not lose exiting tasks during a transition
Date: Mon, 23 Nov 2026 22:40:17 +0000	[thread overview]
Message-ID: <DM6PR05MB41373C039888AD13938D3838D1452@DM6PR05MB4137.namprd05.prod.outlook.com> (raw)
In-Reply-To: <20261123-klp-series-v3-v1-0-427c95811d9b@vt.edu>


The two issues Sashiko reported on patch 2 are valid:

1. An exiting task that has not been unhashed is on both the task list
   and an exit list, so klp_start_transition() can visit it twice and
   set TIF_PATCH_PENDING again after it has switched.

2. Between exit_tasks_rcu_finish() and its final switch, an exiting
   task is on neither list and can still enter patched code with a
   stale patch_state.

v2 will walk the exit lists under tasklist_lock and skip tasks that are
still hashed, so each task is visited exactly once. It will also call
klp_synchronize_transition() before func->transition is set and before
completion, to wait out tasks in that last stretch. It will document
rtp_exit_cursor as well.

I'll post v2 after testing it on mainline. Please hold off on
reviewing v1.

Thanks,
Binoy



  parent reply	other threads:[~2026-11-23 22:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 20:52 Binoy Ravindran via B4 Relay
2026-11-23 20:52 ` [PATCH 1/2] rcu-tasks: Add helpers to visit tasks on the exit lists Binoy Ravindran via B4 Relay
2026-11-23 20:52 ` [PATCH 2/2] livepatch: Include exiting tasks in the transition Binoy Ravindran via B4 Relay
2026-11-23 22:40 ` Ravindran, Binoy [this message]
2026-11-24  4:00   ` [PATCH 0/2] livepatch: Do not lose exiting tasks during a transition Yafang Shao
2026-11-24  4:57     ` Ravindran, Binoy
2026-11-24  6:47       ` Yafang Shao

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=DM6PR05MB41373C039888AD13938D3838D1452@DM6PR05MB4137.namprd05.prod.outlook.com \
    --to=binoy@vt.edu \
    --cc=boqun@kernel.org \
    --cc=frederic@kernel.org \
    --cc=jaidevshastri@vt.edu \
    --cc=jiangshanlai@gmail.com \
    --cc=jikos@kernel.org \
    --cc=joe.lawrence@redhat.com \
    --cc=joelagnelf@nvidia.com \
    --cc=josh@joshtriplett.org \
    --cc=jpoimboe@kernel.org \
    --cc=laoar.shao@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mbenes@suse.cz \
    --cc=mingo@kernel.org \
    --cc=neeraj.upadhyay@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=pmladek@suse.com \
    --cc=qiang.zhang@linux.dev \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=song@kernel.org \
    --cc=urezki@gmail.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®