MIPS: cevt-r4k: Don't call get_c0_compare_int if timer irq is installed
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 38760d40ca61b18b2809e9c28df8b3ff9af8a02b · < 50f2b98dc83de7809a5c5bf0ccf9af2e75c37c13| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
MIPS: cevt-r4k: Don't call get_c0_compare_int if timer irq is installed
This avoids warning:
[ 0.118053] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:283
Caused by get_c0_compare_int on secondary CPU.
We also skipped saving IRQ number to struct clock_event_device *cd as it's never used by clockevent core, as per comments it's only meant for "non CPU local devices".
From the CVE record · Linux
The MIPS cevt-r4k timer code can call get_c0_compare_int on a secondary CPU after the timer IRQ is installed, causing a sleeping-function warning in an invalid context. The input does not describe an attacker action or any network, authentication, or user-interaction conditions.
Engineers running Linux kernels on MIPS systems should check whether their kernel includes the affected cevt-r4k code; affected versions are not specified.