summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_re.py
diff options
context:
space:
mode:
authorArtem Sadovnikov <a.sadovnikov@ispras.ru>2025-06-29 23:12:12 +0000
committerNeeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>2025-07-07 09:45:45 +0530
commit005b6187705bc9723518ce19c5cb911fc1f7ef07 (patch)
tree5a749a3b10343c321cebffd97379900277b9afac /scripts/lib/kdoc/kdoc_re.py
parent86731a2a651e58953fc949573895f2fa6d456841 (diff)
refscale: Check that nreaders and loops multiplication doesn't overflow
The nreaders and loops variables are exposed as module parameters, which, in certain combinations, can lead to multiplication overflow. Besides, loops parameter is defined as long, while through the code is used as int, which can cause truncation on 64-bit kernels and possible zeroes where they shouldn't appear. Since code uses result of multiplication as int anyway, it only makes sense to replace loops with int. Multiplication overflow check is also added due to possible multiplication between two very big numbers. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 653ed64b01dc ("refperf: Add a test to measure performance of read-side synchronization") Signed-off-by: Artem Sadovnikov <a.sadovnikov@ispras.ru> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_re.py')
0 files changed, 0 insertions, 0 deletions