public inbox for mm-commits@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,rppt@kernel.org,pratyush@kernel.org,pasha.tatashin@soleen.com,leotimmins1974@gmail.com,akpm@linux-foundation.org
Subject: [to-be-updated] liveupdate-initialize-incoming-flb-state-before-finish.patch removed from -mm tree
Date: Fri, 03 Apr 2026 10:20:15 -0700	[thread overview]
Message-ID: <20260403172016.33E1DC4CEF7@smtp.kernel.org> (raw)


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


                 reply	other threads:[~2026-04-03 17:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260403172016.33E1DC4CEF7@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=leotimmins1974@gmail.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=pratyush@kernel.org \
    --cc=rppt@kernel.org \
    /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