[PATCH] lib/test_kho: Check if KHO is enabled
Pratyush Yadav
pratyush at kernel.org
Fri Nov 7 08:07:18 PST 2025
On Fri, Nov 07 2025, Pasha Tatashin wrote:
> On Fri, Nov 7, 2025 at 5:24 AM Pratyush Yadav <pratyush at kernel.org> wrote:
>>
>> On Thu, Nov 06 2025, Pasha Tatashin wrote:
>>
>> > We must check whether KHO is enabled prior to issuing KHO commands,
>> > otherwise KHO internal data structures are not initialized.
>>
>> Should we have this check in the KHO APIs instead? This check is easy
>> enough to miss.
>
> I considered adding a kho_is_enabled() check to every KHO API, but it
> seems unnecessary.
>
> In-kernel users of KHO, like reserve_mem and the upcoming LUO, are
> already expected to check if KHO is enabled before doing extra
> preservation work. I anticipate any future in-kernel users will follow
> the same pattern.
Hmm, fair enough. I suppose we can always change this later if it causes
more pain.
Reviewed-by: Pratyush Yadav <pratyush at kernel.org>
[...]
--
Regards,
Pratyush Yadav
More information about the kexec
mailing list