linux/arch/parisc/kernel
John David Anglin 13d57093c1 parisc: Handle vma's whose context is not current in flush_cache_range
In testing James' patch to drivers/parisc/pdc_stable.c, I hit the BUG
statement in flush_cache_range() during a system shutdown:

kernel BUG at arch/parisc/kernel/cache.c:595!
CPU: 2 PID: 6532 Comm: kworker/2:0 Not tainted 4.13.0-rc2+ #1
Workqueue: events free_ioctx

 IAOQ[0]: flush_cache_range+0x144/0x148
 IAOQ[1]: flush_cache_page+0x0/0x1a8
 RP(r2): flush_cache_range+0xec/0x148
Backtrace:
 [<00000000402910ac>] unmap_page_range+0x84/0x880
 [<00000000402918f4>] unmap_single_vma+0x4c/0x60
 [<0000000040291a18>] zap_page_range_single+0x110/0x160
 [<0000000040291c34>] unmap_mapping_range+0x174/0x1a8
 [<000000004026ccd8>] truncate_pagecache+0x50/0xa8
 [<000000004026cd84>] truncate_setsize+0x54/0x70
 [<000000004033d534>] put_aio_ring_file+0x44/0xb0
 [<000000004033d5d8>] aio_free_ring+0x38/0x140
 [<000000004033d714>] free_ioctx+0x34/0xa8
 [<00000000401b0028>] process_one_work+0x1b8/0x4d0
 [<00000000401b04f4>] worker_thread+0x1b4/0x648
 [<00000000401b9128>] kthread+0x1b0/0x208
 [<0000000040150020>] end_fault_vector+0x20/0x28
 [<0000000040639518>] nf_ip_reroute+0x50/0xa8
 [<0000000040638ed0>] nf_ip_route+0x10/0x78
 [<0000000040638c90>] xfrm4_mode_tunnel_input+0x180/0x1f8

CPU: 2 PID: 6532 Comm: kworker/2:0 Not tainted 4.13.0-rc2+ #1
Workqueue: events free_ioctx
Backtrace:
 [<0000000040163bf0>] show_stack+0x20/0x38
 [<0000000040688480>] dump_stack+0xa8/0x120
 [<0000000040163dc4>] die_if_kernel+0x19c/0x2b0
 [<0000000040164d0c>] handle_interruption+0xa24/0xa48

This patch modifies flush_cache_range() to handle non current contexts.
In as much as this occurs infrequently, the simplest approach is to
flush the entire cache when this happens.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Cc: stable@vger.kernel.org # 4.9+
Signed-off-by: Helge Deller <deller@gmx.de>
2017-07-31 08:22:33 +02:00
..
.gitignore
asm-offsets.c parisc: Drop per_cpu uaccess related exception_data struct 2017-05-10 17:46:13 +02:00
audit.c parisc: add kernel audit feature 2013-11-07 22:27:20 +01:00
binfmt_elf32.c fs/binfmt: Convert obsolete cputime type to nsecs 2017-02-01 09:13:51 +01:00
cache.c parisc: Handle vma's whose context is not current in flush_cache_range 2017-07-31 08:22:33 +02:00
compat_audit.c parisc: add kernel audit feature 2013-11-07 22:27:20 +01:00
drivers.c parisc: parisc_bus_type: use dev_groups and not dev_attrs for bus_type 2017-06-09 11:00:45 +02:00
entry.S scripts/spelling.txt: add regsiter -> register spelling mistake 2017-05-08 17:15:13 -07:00
firmware.c parisc: Add function to return DIMM slot of physical address 2017-07-25 19:28:37 +02:00
ftrace.c ftrace: Add return address pointer to ftrace_ret_stack 2016-08-24 12:15:14 +02:00
hardware.c parisc: add serial ports of C8000/1GHz machine to hardware database 2014-07-13 15:51:58 +02:00
head.S parisc: Fix ftrace function tracer 2016-04-14 17:47:19 +02:00
hpmc.S parisc: Don't hardcode PSW values in hpmc code 2017-06-09 11:34:56 +02:00
inventory.c parisc: Add Page Deallocation Table (PDT) support 2017-05-12 09:14:15 +02:00
irq.c parisc: Disable further stack checks when panic occurs during stack check 2017-07-23 20:59:45 +02:00
Makefile parisc: Add Page Deallocation Table (PDT) support 2017-05-12 09:14:15 +02:00
module.c mm, vmalloc: use __GFP_HIGHMEM implicitly 2017-05-08 17:15:13 -07:00
pa7300lc.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/debug.h> 2017-03-02 08:42:34 +01:00
pacache.S parisc: Remove unnecessary TLB purges from flush_dcache_page_asm and flush_icache_page_asm 2016-12-07 09:01:21 +01:00
parisc_ksyms.c parisc: Clean up fixup routines for get_user()/put_user() 2017-03-29 21:50:36 +02:00
pci-dma.c treewide: Constify most dma_map_ops structures 2017-01-24 12:23:35 -05:00
pci.c parisc: Use generic pci_mmap_resource_range() 2017-04-20 08:47:47 -05:00
pdc_chassis.c parisc: single_open() leaks 2013-05-05 00:10:41 -04:00
pdc_cons.c parisc: don't use module_init for non-modular core pdc_cons code 2015-06-16 14:12:30 -04:00
pdt.c parisc: Show DIMM slot number which holds broken memory module 2017-07-25 21:43:10 +02:00
perf_asm.S
perf_images.h
perf.c parisc: perf: Fix potential NULL pointer dereference 2017-03-18 17:24:43 +01:00
process.c parisc: Suspend lockup detectors before system halt 2017-07-25 21:43:38 +02:00
processor.c parisc: Enhance detection of synchronous cr16 clocksources 2017-05-10 17:46:14 +02:00
ptrace.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
real2.S parisc: Add cfi_startproc and cfi_endproc to assembly code 2016-10-05 22:54:40 +02:00
setup.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/clock.h> 2017-03-02 08:42:27 +01:00
signal32.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
signal32.h constify copy_siginfo_to_user{,32}() 2013-11-09 00:16:29 -05:00
signal.c Merge branch 'parisc-4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2017-03-03 16:20:06 -08:00
smp.c sched/headers: Move task->mm handling methods to <linux/sched/mm.h> 2017-03-03 01:43:28 +01:00
stacktrace.c parisc: add LATENCYTOP_SUPPORT and CONFIG_STACKTRACE_SUPPORT 2009-03-31 02:51:34 +00:00
sys_parisc32.c parisc: drop unused defines and header includes 2014-07-13 15:56:12 +02:00
sys_parisc.c mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
syscall_table.S parisc: use compat_sys_keyctl() 2017-07-02 22:10:47 +02:00
syscall.S parisc: Use LINUX_GATEWAY_ADDR define instead of hardcoded value 2016-11-02 23:06:38 +01:00
time.c parisc: Enhance detection of synchronous cr16 clocksources 2017-05-10 17:46:14 +02:00
topology.c
traps.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/debug.h> 2017-03-02 08:42:34 +01:00
unaligned.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/debug.h> 2017-03-02 08:42:34 +01:00
unwind.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
vmlinux.lds.S parisc: Merge millicode routines via linker script 2017-07-23 21:00:28 +02:00