Re: [PATCH v4 11/20] ratelimit: Force re-initialization when rate-limiting re-enabled

From: Petr Mladek
Date: Mon May 05 2025 - 06:20:46 EST


On Tue 2025-04-29 18:05:15, Paul E. McKenney wrote:
> Currently, if rate limiting is disabled, ___ratelimit() does an immediate
> early return with no state changes. This can result in false-positive
> drops when re-enabling rate limiting. Therefore, mark the ratelimit_state
> structure "uninitialized" when rate limiting is disabled.
>
> [ paulmck: Apply Petr Mladek feedback. ]
>
> Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/
> Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@xxxxxx/
> Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
> Cc: Petr Mladek <pmladek@xxxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Cc: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>
> Cc: Mateusz Guzik <mjguzik@xxxxxxxxx>
> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
> Cc: John Ogness <john.ogness@xxxxxxxxxxxxx>
> Cc: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>

Looks goot to me:

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr