* [to-be-updated] liveupdate-initialize-incoming-flb-state-before-finish.patch removed from -mm tree
@ 2026-04-03 17:20 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-04-03 17:20 UTC (permalink / raw)
To: mm-commits, rppt, pratyush, pasha.tatashin, leotimmins1974, akpm
The quilt patch titled
Subject: liveupdate: initialize incoming FLB state before finish
has been removed from the -mm tree. Its filename was
liveupdate-initialize-incoming-flb-state-before-finish.patch
This patch was dropped because an updated version will be issued
------------------------------------------------------
From: Leo Timmins <leotimmins1974@gmail.com>
Subject: liveupdate: initialize incoming FLB state before finish
Date: Wed, 25 Mar 2026 12:46:08 +0800
luo_flb_file_finish_one() decremented incoming.count before making sure
that the incoming FLB state had been materialized. If no earlier incoming
retrieval had populated that state, the first decrement ran from zero and
skipped the last-user finish path.
Initialize the incoming FLB state before the first decrement so finish
uses the serialized refcount instead of an uninitialized value.
[akpm@linux-foundation.org: remove unneeded braces, per Pasha]
Link: https://lkml.kernel.org/r/20260325044608.8407-3-leotimmins1974@gmail.com
Fixes: cab056f2aae7 ("liveupdate: luo_flb: introduce File-Lifecycle-Bound global state")
Signed-off-by: Leo Timmins <leotimmins1974@gmail.com>
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Pratyush Yadav <pratyush@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/liveupdate/luo_flb.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
--- a/kernel/liveupdate/luo_flb.c~liveupdate-initialize-incoming-flb-state-before-finish
+++ a/kernel/liveupdate/luo_flb.c
@@ -192,8 +192,24 @@ static int luo_flb_retrieve_one(struct l
static void luo_flb_file_finish_one(struct liveupdate_flb *flb)
{
struct luo_flb_private *private = luo_flb_get_private(flb);
+ bool needs_retrieve = false;
u64 count;
+ scoped_guard(mutex, &private->incoming.lock) {
+ if (!private->incoming.count && !private->incoming.finished)
+ needs_retrieve = true;
+ }
+
+ if (needs_retrieve) {
+ int err = luo_flb_retrieve_one(flb);
+
+ if (err) {
+ pr_warn("Failed to retrieve FLB '%s' during finish: %pe\n",
+ flb->compatible, ERR_PTR(err));
+ return;
+ }
+ }
+
scoped_guard(mutex, &private->incoming.lock)
count = --private->incoming.count;
_
Patches currently in -mm which might be from leotimmins1974@gmail.com are
liveupdate-propagate-file-deserialization-failures.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-04-03 17:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-03 17:20 [to-be-updated] liveupdate-initialize-incoming-flb-state-before-finish.patch removed from -mm tree Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox