> On Jan 22, 2025, at 20:50, Petr Mladek <[email protected]> wrote:
>
> With this patch, any operation which takes the tasklist_lock might
> break klp_try_complete_transition(). I am afraid that this might
> block the transition for a long time on huge systems with some
> specific loads.
>
> And the problem is caused by a printk() added just for debugging.
> I wonder if you even use a slow serial port.
>
> You might try to use printk_deferred() instead. Also you might need
> to disable interrupts around the read_lock()/read_unlock() to
> make sure that the console handling will be deferred after
> the tasklist_lock gets released.
>
> Anyway, I am against this patch.
>
> Best Regards,
> Petr
Hi, Petr.
I am unfamiliar with the function `rwlock_is_contended`, but it seems this
function will not block and just only check the status of the rw_lock.
If I understand it right, the problem would raise from the `break` which will
stop the process of `for_each_process_thread`, right?
Thanks.
Wardenjohn.