mirror of https://github.com/torvalds/linux.git
Running an "echo t > /proc/sysrq-trigger" crashes the parisc kernel. The
problem is, that in print_worker_info() we try to read the workqueue info via
the probe_kernel_read() functions which use pagefault_disable() to avoid
crashes like this:
probe_kernel_read(&pwq, &worker->current_pwq, sizeof(pwq));
probe_kernel_read(&wq, &pwq->wq, sizeof(wq));
probe_kernel_read(name, wq->name, sizeof(name) - 1);
The problem here is, that the first probe_kernel_read(&pwq) might return zero
in pwq and as such the following probe_kernel_reads() try to access contents of
the page zero which is read protected and generate a kernel segfault.
With this patch we fix the interruption handler to call parisc_terminate()
directly only if pagefault_disable() was not called (in which case
preempt_count()==0). Otherwise we hand over to the pagefault handler which
will try to look up the faulting address in the fixup tables.
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: <stable@vger.kernel.org> # v3.0+
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| Makefile | ||
| asm-offsets.c | ||
| binfmt_elf32.c | ||
| cache.c | ||
| drivers.c | ||
| entry.S | ||
| firmware.c | ||
| ftrace.c | ||
| hardware.c | ||
| head.S | ||
| hpmc.S | ||
| inventory.c | ||
| irq.c | ||
| module.c | ||
| pa7300lc.c | ||
| pacache.S | ||
| parisc_ksyms.c | ||
| pci-dma.c | ||
| pci.c | ||
| pdc_chassis.c | ||
| pdc_cons.c | ||
| perf.c | ||
| perf_asm.S | ||
| perf_images.h | ||
| process.c | ||
| processor.c | ||
| ptrace.c | ||
| real2.S | ||
| setup.c | ||
| signal.c | ||
| signal32.c | ||
| signal32.h | ||
| smp.c | ||
| stacktrace.c | ||
| sys_parisc.c | ||
| sys_parisc32.c | ||
| syscall.S | ||
| syscall_table.S | ||
| time.c | ||
| topology.c | ||
| traps.c | ||
| unaligned.c | ||
| unwind.c | ||
| vmlinux.lds.S | ||