linux/arch/mips/kernel
Ralf Baechle 1f717929e9 MIPS: Handle __put_user() sleeping.
do_signal() does __put_user() which can fault, resulting in a might_sleep()
warning in down_read(&mm->mmap_sem) and a "scheduling while atomic" warning
when mmap_sem is contented. On Swarm this also results in:

WARNING: at kernel/smp.c:459 smp_call_function_many+0x148/0x398()
Modules linked in:
Call Trace:

[<ffffffff804b48a4>] dump_stack+0x1c/0x50
[<ffffffff8013dc94>] warn_slowpath_common+0x8c/0xc8
[<ffffffff8013dcfc>] warn_slowpath_null+0x2c/0x40
[<ffffffff801864a0>] smp_call_function_many+0x148/0x398
[<ffffffff80186748>] smp_call_function+0x58/0xa8
[<ffffffff80119b5c>] r4k_flush_data_cache_page+0x54/0xd8
[<ffffffff801f39bc>] handle_pte_fault+0xa9c/0xad0
[<ffffffff801f40d0>] handle_mm_fault+0x158/0x200
[<ffffffff80115548>] do_page_fault+0x218/0x3b0
[<ffffffff80102744>] ret_from_exception+0x0/0x10
[<ffffffff8010eb18>] copy_siginfo_to_user32+0x50/0x298
[<ffffffff8010edf0>] setup_rt_frame_32+0x90/0x250
[<ffffffff80106414>] do_notify_resume+0x154/0x358
[<ffffffff80102930>] work_notifysig+0xc/0x14

Fixed by enabling interrupts in do_notify_resume before delivering signals.

[ralf@linux-mips.org: Reported and original fix by tglx but I wanted to
minimize the amount of code being run with interrupts disabled so I moved
the local_irq_disable() call right into do_notify_resume.  Which is saner
than doing it in entry.S.]

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-09-21 17:52:38 +02:00
..
cpufreq
.gitignore
8250-platform.c
asm-offsets.c
binfmt_elfn32.c
binfmt_elfo32.c
branch.c
cevt-bcm1480.c
cevt-ds1287.c
cevt-gt641xx.c
cevt-r4k.c MIPS: Fix CP0 COUNTER clockevent race 2010-12-16 18:10:58 +00:00
cevt-sb1250.c
cevt-smtc.c
cevt-txx9.c mips: convert to clocksource_register_hz/khz 2011-02-21 13:33:50 -08:00
cpu-bugs64.c Fix common misspellings 2011-03-31 11:26:23 -03:00
cpu-probe.c MIPS: Remove pointless return statement from empty void functions. 2011-07-25 17:26:55 +01:00
csrc-bcm1480.c mips: convert to clocksource_register_hz/khz 2011-02-21 13:33:50 -08:00
csrc-ioasic.c mips: convert to clocksource_register_hz/khz 2011-02-21 13:33:50 -08:00
csrc-powertv.c mips: convert to clocksource_register_hz/khz 2011-02-21 13:33:50 -08:00
csrc-r4k.c mips: convert to clocksource_register_hz/khz 2011-02-21 13:33:50 -08:00
csrc-sb1250.c mips: convert to clocksource_register_hz/khz 2011-02-21 13:33:50 -08:00
early_printk.c
entry.S MIPS: Split do_syscall_trace into two functions. 2011-05-19 09:55:44 +01:00
ftrace.c MIPS: Ftrace: Fix the CONFIG_DYNAMIC_FTRACE=n compile 2011-09-21 17:52:04 +02:00
genex.S
gpio_txx9.c
head.S
i8253.c mips: Fix i8253 clockevent fallout 2011-07-22 11:18:22 +02:00
i8259.c MIPS: i8259: Mark cascade interrupt non-threaded 2011-09-21 17:52:28 +02:00
init_task.c
irq_cpu.c MIPS: Install handlers for software IRQs 2011-07-25 17:26:54 +01:00
irq_txx9.c MIPS: Convert the irq functions to the new names 2011-03-29 14:48:07 +02:00
irq-gic.c MIPS: Convert the irq functions to the new names 2011-03-29 14:48:07 +02:00
irq-gt641xx.c MIPS: Convert the irq functions to the new names 2011-03-29 14:48:07 +02:00
irq-msc01.c MIPS: Convert the irq functions to the new names 2011-03-29 14:48:07 +02:00
irq-rm7000.c MIPS: Convert the irq functions to the new names 2011-03-29 14:48:07 +02:00
irq-rm9000.c MIPS: Convert the irq functions to the new names 2011-03-29 14:48:07 +02:00
irq.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
jump_label.c MIPS: jump label: Add MIPS support. 2011-01-18 19:30:24 +01:00
kgdb.c
kprobes.c
kspd.c
linux32.c
machine_kexec.c
Makefile MIPS: Kconfig and Makefile update for Netlogic XLR/XLS 2011-05-19 09:55:40 +01:00
mcount.S
mips_ksyms.c
mips_machine.c MIPS: Add generic support for multiple machines within a single kernel 2011-01-18 19:30:21 +01:00
mips-mt-fpaff.c
mips-mt.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
module.c modules: make arch's use default loader hooks 2011-07-24 22:06:04 +09:30
octeon_switch.S update David Miller's old email address 2011-04-06 06:19:38 -07:00
perf_event_mipsxx.c perf, arch: Add generic NODE cache events 2011-07-01 11:06:38 +02:00
perf_event.c Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus 2011-07-26 14:17:28 -07:00
proc.c MIPS: Probe for presence of KScratch registers. 2011-01-18 19:30:22 +01:00
process.c Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus 2011-07-26 14:17:28 -07:00
prom.c dt/flattree: explicitly pass command line pointer to early_init_dt_scan_chosen 2011-05-11 14:53:18 +02:00
ptrace32.c
ptrace.c MIPS: Split do_syscall_trace into two functions. 2011-05-19 09:55:44 +01:00
r4k_fpu.S update David Miller's old email address 2011-04-06 06:19:38 -07:00
r4k_switch.S update David Miller's old email address 2011-04-06 06:19:38 -07:00
r2300_fpu.S update David Miller's old email address 2011-04-06 06:19:38 -07:00
r2300_switch.S update David Miller's old email address 2011-04-06 06:19:38 -07:00
r6000_fpu.S update David Miller's old email address 2011-04-06 06:19:38 -07:00
relocate_kernel.S
reset.c
rtlx.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
scall32-o32.S All Arch: remove linkage for sys_nfsservctl system call 2011-08-26 15:09:58 -07:00
scall64-64.S All Arch: remove linkage for sys_nfsservctl system call 2011-08-26 15:09:58 -07:00
scall64-n32.S All Arch: remove linkage for sys_nfsservctl system call 2011-08-26 15:09:58 -07:00
scall64-o32.S All Arch: remove linkage for sys_nfsservctl system call 2011-08-26 15:09:58 -07:00
setup.c MIPS: Implement __read_mostly 2011-01-18 19:30:28 +01:00
signal32.c MIPS: Fix GCC-4.6 'set but not used' warning in signal*.c 2011-03-14 21:07:25 +01:00
signal_n32.c
signal-common.h
signal.c MIPS: Handle __put_user() sleeping. 2011-09-21 17:52:38 +02:00
smp-cmp.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
smp-mt.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
smp-up.c
smp.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
smtc-asm.S
smtc-proc.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
smtc.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
spinlock_test.c
spram.c
stacktrace.c
sync-r4k.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
syscall.c MIPS: Move arch_get_unmapped_area and gang to new file. 2011-05-19 09:55:49 +01:00
time.c Fix common misspellings 2011-03-31 11:26:23 -03:00
topology.c
traps.c MIPS: Make the die_lock be raw 2011-09-21 17:52:09 +02:00
unaligned.c perf: Remove the nmi parameter from the swevent and overflow interface 2011-07-01 11:06:35 +02:00
vdso.c
vmlinux.lds.S Merge branch 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2011-05-24 11:53:42 -07:00
vpe.c MIPS: VPE: Select correct tc 2011-09-17 02:37:03 +02:00
watch.c