summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorTao Cui <cuitao@kylinos.cn>2026-08-10 12:21:50 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2026-08-10 12:21:50 +0800
commit01c823f14ed4caac4bf1ceb90926f26d67d753ec (patch)
tree001343cfb5314299fcc54613d36e23ec7469546c /tools/perf/scripts/python/bin
parentfe41c0759b11b982f945633b7abb4b49dfaf8ce4 (diff)
LoongArch: KVM: Prevent division by zero in periodic timer restore
A guest can write CSR.TCFG with the periodic bit set but a period value of zero. When kvm_restore_timer() later enters the periodic branch, period = cfg & CSR_TCFG_VAL evaluates to 0, causing (delta % period) to trigger a division by zero and crash the host kernel. Clamp the period to 1 to avoid the panic. Fixes: a5857b9ff6e0 ("LoongArch: KVM: Implement vcpu timer operations") Reviewed-by: Bibo Mao <maobibo@loongson.cn> Signed-off-by: Tao Cui <cuitao@kylinos.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions