RE: [PATCH v12] x86/split_lock: Enable split lock detection by kernel

From: Luck, Tony
Date: Thu Jan 23 2020 - 12:15:37 EST


>> static void __init split_lock_setup(void)
>> {
>> - enum split_lock_detect_state sld = sld_state;
>> + enum split_lock_detect_state sld;
>
> This is bike-shedding, but initializing sld = sld_warn here would have
> been enough with no other changes to the patch I think?

Not quite. If there isn't a command line option, we get here:

if (ret < 0)
goto print;

which skips copying the local "sld" to the global "sld_state".

-Tony