aboutsummaryrefslogtreecommitdiff
path: root/lib/test_overflow.c
diff options
context:
space:
mode:
authorDennis Zhou <[email protected]>2021-06-14 14:42:05 +0000
committerDennis Zhou <[email protected]>2021-06-14 14:42:05 +0000
commit4829c791b22f98f95339248a428caf08b5f1e3e5 (patch)
treeccd014d07bde7da164bf24375d263f1952c6eb49 /lib/test_overflow.c
parentfaf65dde844affa9e360ccaa4bd231c2a04b87ea (diff)
percpu: initialize best_upa variable
Tom reported this finding from clang 10's static analysis [1]. Due to the way the code is written, it will always see a successful loop iteration. Instead of setting an initial value, check that it was set instead with BUG_ON() because 0 units per allocation is bogus. [1] https://lore.kernel.org/lkml/[email protected]/ Reported-by: Tom Rix <[email protected]> Signed-off-by: Dennis Zhou <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions