diff options
| author | Thomas Gleixner <[email protected]> | 2024-06-10 12:46:37 +0000 |
|---|---|---|
| committer | Peter Zijlstra <[email protected]> | 2024-06-11 09:25:23 +0000 |
| commit | 695ef796467ed228b60f1915995e390aea3d85c6 (patch) | |
| tree | 6303760e45a615d9712c02520b420d6d10f5b695 /rust/helpers.c | |
| parent | jump_label: Fix concurrency issues in static_key_slow_dec() (diff) | |
| download | kernel-695ef796467ed228b60f1915995e390aea3d85c6.tar.gz kernel-695ef796467ed228b60f1915995e390aea3d85c6.zip | |
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 <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'rust/helpers.c')
0 files changed, 0 insertions, 0 deletions
