Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f5d12045 authored by Junjie Wu's avatar Junjie Wu
Browse files

cpufreq: interactive_pro: Fix race condition in adding/deleting timers



Adding or deleting timer should be protected by a lock to prevent
double add errors. Otherwise, following crash might occur.

kernel BUG at <...>/kernel/lib/list_debug.c:40!
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
Modules linked in:
Call trace:
[<ffffffc0002a7a3c>] __list_add+0xcc/0xf4
[<ffffffc0000a3844>] __internal_add_timer+0xa4/0xb0
[<ffffffc0000a38bc>] internal_add_timer+0x14/0x4c
[<ffffffc0000a4538>] add_timer_on+0x118/0x148
[<ffffffc000674244>] load_change_callback+0x64/0x88
[<ffffffc0000bb538>] notifier_call_chain+0x44/0x80
[<ffffffc0000bb6c8>] __atomic_notifier_call_chain+0x38/0x50
[<ffffffc0000bb6f0>] atomic_notifier_call_chain+0x10/0x1c
[<ffffffc0000c4b80>] set_task_cpu+0x418/0x4d0
[<ffffffc0000c70d8>] try_to_wake_up+0x228/0x3b8
[<ffffffc0000c72d4>] wake_up_state+0xc/0x18
[<ffffffc0000ecbe0>] wake_futex+0x6c/0xa0
[<ffffffc0000ed584>] futex_wake+0xd4/0x124
[<ffffffc0000eec74>] do_futex+0xe4/0x8b0
[<ffffffc0000ef978>] compat_SyS_futex+0xc8/0x150

CRs-fixed: 696284
Change-Id: I504a129b62120867db7587b2fb3df27525852093
Signed-off-by: default avatarJunjie Wu <junjiew@codeaurora.org>
parent 408d933c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment