[PATCH] kexec: initialize kexec_page in kexec()

Jan Beulich posted 1 patch 3 months, 2 weeks ago
Failed in applying to current master (apply log)
[PATCH] kexec: initialize kexec_page in kexec()
Posted by Jan Beulich 3 months, 2 weeks ago
For the error patch to not see it uninitialized.

Fixes: 560c2a5584c4 ("mini-os: kexec: do the final kexec step")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
In the meantime I'll revert the MiniOS commit update in the main tree.

--- a/kexec.c
+++ b/kexec.c
@@ -168,7 +168,7 @@ int kexec(void *kernel, unsigned long kernel_size, const char *cmdline)
 {
     int ret;
     unsigned long *func;
-    void *kexec_page;
+    void *kexec_page = NULL;
 
     ret = analyze_kernel(kernel, kernel_size);
     if ( ret )
Re: [PATCH] kexec: initialize kexec_page in kexec()
Posted by Jürgen Groß 3 months, 2 weeks ago
On 17.07.25 13:53, Jan Beulich wrote:
> For the error patch to not see it uninitialized.
> 
> Fixes: 560c2a5584c4 ("mini-os: kexec: do the final kexec step")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen
Re: [PATCH] kexec: initialize kexec_page in kexec()
Posted by Jan Beulich 3 months, 2 weeks ago
On 17.07.2025 13:58, Jürgen Groß wrote:
> On 17.07.25 13:53, Jan Beulich wrote:
>> For the error patch to not see it uninitialized.
>>
>> Fixes: 560c2a5584c4 ("mini-os: kexec: do the final kexec step")
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> Reviewed-by: Juergen Gross <jgross@suse.com>

Thanks.

The revert actually didn't help, the problem was already introduced earlier.
I now don't understand how things built previously. I'll re-apply the patch
bumping the new revision to this about-to-be-committed fix.

Jan

Re: [PATCH] kexec: initialize kexec_page in kexec()
Posted by Jürgen Groß 3 months, 2 weeks ago
On 17.07.25 14:04, Jan Beulich wrote:
> On 17.07.2025 13:58, Jürgen Groß wrote:
>> On 17.07.25 13:53, Jan Beulich wrote:
>>> For the error patch to not see it uninitialized.
>>>
>>> Fixes: 560c2a5584c4 ("mini-os: kexec: do the final kexec step")
>>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>
>> Reviewed-by: Juergen Gross <jgross@suse.com>
> 
> Thanks.
> 
> The revert actually didn't help, the problem was already introduced earlier.
> I now don't understand how things built previously. I'll re-apply the patch
> bumping the new revision to this about-to-be-committed fix.

It worked before because the patch enabling CONFIG_KEXEC for the stubdom wasn't
there.


Juergen