[PATCH 1/2] liveupdate: luo_session: Fix uninitialized variable in luo_session_setup_outgoing()

Dan Carpenter posted 2 patches 5 days, 7 hours ago
[PATCH 1/2] liveupdate: luo_session: Fix uninitialized variable in luo_session_setup_outgoing()
Posted by Dan Carpenter 5 days, 7 hours ago
The "header_ser" variable is uninitialized.  The "outgoing_buffer"
variable was intended here, so use that instead.

Fixes: 7eeeec7e1690 ("liveupdate: luo_session: add sessions support")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 kernel/liveupdate/luo_session.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/liveupdate/luo_session.c b/kernel/liveupdate/luo_session.c
index cf5c83b272e7..a572bf689712 100644
--- a/kernel/liveupdate/luo_session.c
+++ b/kernel/liveupdate/luo_session.c
@@ -447,7 +447,7 @@ int __init luo_session_setup_outgoing(void *fdt_out)
 
 	outgoing_buffer = kho_alloc_preserve(LUO_SESSION_PGCNT << PAGE_SHIFT);
 	if (IS_ERR(outgoing_buffer))
-		return PTR_ERR(header_ser);
+		return PTR_ERR(outgoing_buffer);
 	header_ser = outgoing_buffer;
 	header_ser_pa = virt_to_phys(header_ser);
 
-- 
2.51.0
Re: [PATCH 1/2] liveupdate: luo_session: Fix uninitialized variable in luo_session_setup_outgoing()
Posted by Pasha Tatashin 5 days, 7 hours ago
On Wed, Nov 26, 2025 at 9:51 AM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> The "header_ser" variable is uninitialized.  The "outgoing_buffer"
> variable was intended here, so use that instead.
>
> Fixes: 7eeeec7e1690 ("liveupdate: luo_session: add sessions support")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  kernel/liveupdate/luo_session.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/liveupdate/luo_session.c b/kernel/liveupdate/luo_session.c
> index cf5c83b272e7..a572bf689712 100644
> --- a/kernel/liveupdate/luo_session.c
> +++ b/kernel/liveupdate/luo_session.c
> @@ -447,7 +447,7 @@ int __init luo_session_setup_outgoing(void *fdt_out)
>
>         outgoing_buffer = kho_alloc_preserve(LUO_SESSION_PGCNT << PAGE_SHIFT);
>         if (IS_ERR(outgoing_buffer))
> -               return PTR_ERR(header_ser);
> +               return PTR_ERR(outgoing_buffer);
>         header_ser = outgoing_buffer;
>         header_ser_pa = virt_to_phys(header_ser);

This is already fixed in LUOv8.

Thank you,
Pasha

>
> --
> 2.51.0
>