Skip to contentSkip to conversation

[????] Re: [PATCH] x86/math64: handle #DE in mul_u64_u64_div_u64()

SPAM Li,Rongqing 1 participant 1 message Jul 22, 2025

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines

Even for the scheduler that recently trapped here, the 64bit sum was about the wrap and the very small value returned then almost certainly wouldn't have been handled correctly.
(So that code needs fixing anyway to avoid the overflow.)

There are currently two bugs. The one Oleg is fixing is a crash bug in the x86-64 mul_u64_u64_div_u64() function caused by potential overflow. The mul_u64_u64_div_u64() function is used not only in cputime.c ,but also widely used within drivers. The other one is a thread group statistics time overflow bug. If the overflow of mul_u64_u64_div_u64() can be fixed, it at least doesn't crash the system anymore. However, regarding the accuracy of the timing statistics, this bug might be more harder to fix.

-Li