From: Leo Timmins <leotimmins1974@gmail.com>
To: pasha.tatashin@soleen.com, rppt@kernel.org, linux-kernel@vger.kernel.org
Cc: pratyush@kernel.org, akpm@linux-foundation.org,
Leo Timmins <leotimmins1974@gmail.com>
Subject: [PATCH v3 1/2] liveupdate: propagate file deserialization failures
Date: Thu, 26 Mar 2026 12:25:34 +0800 [thread overview]
Message-ID: <20260326042546.8031-2-leotimmins1974@gmail.com> (raw)
In-Reply-To: <20260326042546.8031-1-leotimmins1974@gmail.com>
luo_session_deserialize() ignored the return value from
luo_file_deserialize(). As a result, a session could be left partially
restored even though the /dev/liveupdate open path treats deserialization
failures as fatal.
Propagate the error so a failed file deserialization aborts session
deserialization instead of silently continuing.
Fixes: 16cec0d26521 ("liveupdate: luo_session: add ioctls for file preservation")
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Leo Timmins <leotimmins1974@gmail.com>
---
kernel/liveupdate/luo_session.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/kernel/liveupdate/luo_session.c b/kernel/liveupdate/luo_session.c
index 783677295640..25ae704d7787 100644
--- a/kernel/liveupdate/luo_session.c
+++ b/kernel/liveupdate/luo_session.c
@@ -558,8 +558,13 @@ int luo_session_deserialize(void)
}
scoped_guard(mutex, &session->mutex) {
- luo_file_deserialize(&session->file_set,
- &sh->ser[i].file_set_ser);
+ err = luo_file_deserialize(&session->file_set,
+ &sh->ser[i].file_set_ser);
+ }
+ if (err) {
+ pr_warn("Failed to deserialize files for session [%s] %pe\n",
+ session->name, ERR_PTR(err));
+ return err;
}
}
--
2.53.0
next prev parent reply other threads:[~2026-03-26 4:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 4:25 [PATCH v3 0/2] liveupdate: fix incoming error handling and teardown paths Leo Timmins
2026-03-26 4:25 ` Leo Timmins [this message]
2026-04-02 12:17 ` [PATCH v3 1/2] liveupdate: propagate file deserialization failures Pratyush Yadav
2026-03-26 4:25 ` [PATCH v3 2/2] liveupdate: initialize incoming FLB state before finish Leo Timmins
2026-03-26 14:50 ` Pasha Tatashin
2026-04-02 13:28 ` Pratyush Yadav
2026-04-02 18:15 ` Andrew Morton
2026-04-03 9:04 ` Pratyush Yadav
2026-04-03 17:26 ` Andrew Morton
[not found] ` <CA+uuG7Lnc94vTmZPEhbvQXgAzWJDL28Zf=QR=uAkmiWvoW+Uxw@mail.gmail.com>
2026-04-04 15:43 ` Leo Timmins
2026-04-05 7:35 ` Pratyush Yadav
2026-03-28 0:32 ` [PATCH v3 0/2] liveupdate: fix incoming error handling and teardown paths Andrew Morton
2026-03-28 1:47 ` Pasha Tatashin
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=20260326042546.8031-2-leotimmins1974@gmail.com \
--to=leotimmins1974@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@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
Powered by JetHome