mirror of
https://github.com/torvalds/linux.git
synced 2024-11-19 18:41:48 +00:00
ac78884e6d
CPU: Testing write buffer coherency: ok
------------[ cut here ]------------
WARNING: at kernel/lockdep.c:3145 check_flags+0xcc/0x1dc()
Modules linked in:
[<c0035120>] (unwind_backtrace+0x0/0xf8) from [<c0355374>] (dump_stack+0x20/0x24)
[<c0355374>] (dump_stack+0x20/0x24) from [<c0060c04>] (warn_slowpath_common+0x58/0x70)
[<c0060c04>] (warn_slowpath_common+0x58/0x70) from [<c0060c3c>] (warn_slowpath_null+0x20/0x24)
[<c0060c3c>] (warn_slowpath_null+0x20/0x24) from [<c008f224>] (check_flags+0xcc/0x1dc)
[<c008f224>] (check_flags+0xcc/0x1dc) from [<c00945dc>] (lock_acquire+0x50/0x140)
[<c00945dc>] (lock_acquire+0x50/0x140) from [<c0358434>] (_raw_spin_lock+0x50/0x88)
[<c0358434>] (_raw_spin_lock+0x50/0x88) from [<c00fd114>] (set_task_comm+0x2c/0x60)
[<c00fd114>] (set_task_comm+0x2c/0x60) from [<c007e184>] (kthreadd+0x30/0x108)
[<c007e184>] (kthreadd+0x30/0x108) from [<c0030104>] (kernel_thread_exit+0x0/0x8)
---[ end trace 1b75b31a2719ed1c ]---
possible reason: unannotated irqs-on.
irq event stamp: 3
hardirqs last enabled at (2): [<c0059bb0>] finish_task_switch+0x48/0xb0
hardirqs last disabled at (3): [<c002f0b0>] ret_slow_syscall+0xc/0x1c
softirqs last enabled at (0): [<c005f3e0>] copy_process+0x394/0xe5c
softirqs last disabled at (0): [<(null)>] (null)
Fix this by ensuring that the lockdep interrupt state is manipulated in
the appropriate places. We essentially treat userspace as an entirely
separate environment which isn't relevant to lockdep (lockdep doesn't
monitor userspace.) We don't tell lockdep that IRQs will be enabled
in that environment.
Instead, when creating kernel threads (which is a rare event compared
to entering/leaving userspace) we have to update the lockdep state. Do
this by starting threads with IRQs disabled, and in the kthread helper,
tell lockdep that IRQs are enabled, and enable them.
This provides lockdep with a consistent view of the current IRQ state
in kernel space.
This also revert portions of
|
||
---|---|---|
.. | ||
.gitignore | ||
armksyms.c | ||
arthur.c | ||
asm-offsets.c | ||
atags.c | ||
atags.h | ||
bios32.c | ||
calls.S | ||
compat.c | ||
compat.h | ||
crunch-bits.S | ||
crunch.c | ||
debug.S | ||
dma-isa.c | ||
dma.c | ||
early_printk.c | ||
ecard.c | ||
ecard.h | ||
elf.c | ||
entry-armv.S | ||
entry-common.S | ||
entry-header.S | ||
etm.c | ||
fiq.c | ||
ftrace.c | ||
head-common.S | ||
head-nommu.S | ||
head.S | ||
init_task.c | ||
io.c | ||
irq.c | ||
isa.c | ||
iwmmxt.S | ||
kgdb.c | ||
kprobes-decode.c | ||
kprobes.c | ||
leds.c | ||
machine_kexec.c | ||
Makefile | ||
module.c | ||
perf_event.c | ||
pmu.c | ||
process.c | ||
ptrace.c | ||
ptrace.h | ||
relocate_kernel.S | ||
return_address.c | ||
setup.c | ||
signal.c | ||
signal.h | ||
smp_scu.c | ||
smp_twd.c | ||
smp.c | ||
stacktrace.c | ||
sys_arm.c | ||
sys_oabi-compat.c | ||
tcm.c | ||
tcm.h | ||
thumbee.c | ||
time.c | ||
traps.c | ||
unwind.c | ||
vmlinux.lds.S | ||
xscale-cp0.c |