You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jump_label: Clarify condition in static_key_fast_inc_not_disabled()
JIRA: https://issues.redhat.com/browse/RHEL-68940
commit 695ef79
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Mon, 10 Jun 2024 14:46:37 +0200
jump_label: Clarify condition in static_key_fast_inc_not_disabled()
The second part of
if (v <= 0 || (v + 1) < 0)
is not immediately obvious that it acts as overflow protection.
Check explicitely for v == INT_MAX instead and add a proper comment how
this is used at the call sites.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20240610124406.484973160@linutronix.de
Signed-off-by: Waiman Long <longman@redhat.com>
0 commit comments