]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ratelimit: Force re-initialization when rate-limiting re-enabled
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 23 Apr 2025 19:03:59 +0000 (12:03 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 8 May 2025 23:13:27 +0000 (16:13 -0700)
commitaa2cc356f8791438761efa0cb95fd48f3e2721c2
treedac7567366db8e8774c37a45546c26a462f1ba22
parent084a990ded6337fb603f39b43b67ec68c2da0695
ratelimit: Force re-initialization when rate-limiting re-enabled

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@web.de/
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Kuniyuki Iwashima <kuniyu@amazon.com>
Cc: Mateusz Guzik <mjguzik@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: John Ogness <john.ogness@linutronix.de>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
lib/ratelimit.c