summaryrefslogtreecommitdiffstats
path: root/mm/hugetlb_cgroup.c
diff options
context:
space:
mode:
authorDennis Zhou <dennis@kernel.org>2021-06-14 16:42:05 +0200
committerDennis Zhou <dennis@kernel.org>2021-06-14 16:42:05 +0200
commit4829c791b22f98f95339248a428caf08b5f1e3e5 (patch)
treeccd014d07bde7da164bf24375d263f1952c6eb49 /mm/hugetlb_cgroup.c
parentpercpu: rework memcg accounting (diff)
downloadlinux-4829c791b22f98f95339248a428caf08b5f1e3e5.tar.xz
linux-4829c791b22f98f95339248a428caf08b5f1e3e5.zip
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/20210515180817.1751084-1-trix@redhat.com/ Reported-by: Tom Rix <trix@redhat.com> Signed-off-by: Dennis Zhou <dennis@kernel.org>
Diffstat (limited to 'mm/hugetlb_cgroup.c')
0 files changed, 0 insertions, 0 deletions