linux/kernel/liveupdate
Pasha Tatashin 0562b572ce liveupdate: fix return value on session allocation failure
When session allocation fails during deserialization, the global 'err'
variable was not updated before returning.  This caused subsequent calls
to luo_session_deserialize() to incorrectly report success.

Ensure 'err' is set to the error code from PTR_ERR(session).  This ensures
that an error is correctly returned to userspace when it attempts to open
/dev/liveupdate in the new kernel if deserialization failed.

Link: https://lore.kernel.org/20260415193738.515491-1-pasha.tatashin@soleen.com
Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: Pratyush Yadav (Google) <pratyush@kernel.org>
Cc: David Matlack <dmatlack@google.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Samiullah Khawaja <skhawaja@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-04-27 05:54:23 -07:00
..
Kconfig liveupdate: separate memfd support into LIVEUPDATE_MEMFD 2026-01-26 19:07:10 -08:00
kexec_handover_debug.c
kexec_handover_debugfs.c kho: fix kho_in_debugfs_init() to handle non-FDT blobs 2026-04-18 00:10:48 -07:00
kexec_handover_internal.h kho: rename fdt parameter to blob in kho_add/remove_subtree() 2026-04-18 00:10:48 -07:00
kexec_handover.c kho: kexec-metadata: track previous kernel chain 2026-04-18 00:10:48 -07:00
luo_core.c liveupdate: protect file handler list with rwsem 2026-04-18 00:10:49 -07:00
luo_file.c liveupdate: defer file handler module refcounting to active sessions 2026-04-18 00:10:50 -07:00
luo_flb.c liveupdate: make unregister functions return void 2026-04-18 00:10:50 -07:00
luo_internal.h liveupdate: remove liveupdate_test_unregister() 2026-04-18 00:10:50 -07:00
luo_session.c liveupdate: fix return value on session allocation failure 2026-04-27 05:54:23 -07:00
Makefile liveupdate: luo_flb: introduce File-Lifecycle-Bound global state 2026-02-08 00:13:33 -08:00