Files
kernel_common_drivers/include/linux
song.han fe1184b655 iotrace: add preempt protections at hooks [1/1]
PD#SWPL-179411

Problem:
BUG: sleeping function called from invalid context
	at kernel/sched/completion.c
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1,
	name: swapper/0
Preemption disabled at:
[<c0428468>] queue_stop_cpus_work+0x60/0x1bc
[<c030dc24>] show_stack+0x28/0x2c
[<c105e624>] dump_stack_lvl+0x48/0x54
[<c0371660>] ___might_sleep+0x1c4/0x1e8
[<c10621b8>] wait_for_completion+0x28/0x58
[<c0428180>] stop_machine_cpuslocked+0x10c/0x208
[<c106ac28>] patch_text+0x20/0x28
[<c0501254>] __jump_label_update+0x7c/0xec
[<c05002b8>] static_key_enable_cpuslocked+0x8c/0x100
[<c050034c>] static_key_enable+0x20/0x28
[<c0441acc>] tracepoint_add_func+0x38c/0x400
[<c0441c00>] tracepoint_probe_register+0x54/0x6c
[<c0db6974>] ftrace_ramoops_init+0x288/0x2fc
[<c163cb30>] aml_iotrace_init+0x46c/0x550
[<c03020a0>] do_one_initcall+0x104/0x364
[<c1601f90>] do_initcall_level+0xa0/0x15c
[<c1601ec0>] do_initcalls+0x58/0x88
[<c1601d04>] kernel_init_freeable+0x114/0x160
[<c105fe24>] kernel_init+0x20/0x1c4
[<c0300134>] ret_from_fork+0x14/0x40

Solution:
add preempt protections at hooks

Verify:
t5w

Change-Id: Ib6a13e104aeb697e84e331152f6ea41ef6d11b35
Signed-off-by: song.han <song.han@amlogic.com>
2024-11-25 20:19:36 +08:00
..