linux-stable/arch
Vineet Gupta 4749ffdfbb ARC: show_regs: lockdep: avoid page allocator...
[ Upstream commit ab6c03676c ]

and use smaller/on-stack buffer instead

The motivation for this change was lockdep splat like below.

| potentially unexpected fatal signal 11.
| BUG: sleeping function called from invalid context at ../mm/page_alloc.c:4317
| in_atomic(): 1, irqs_disabled(): 0, pid: 57, name: segv
| no locks held by segv/57.
| Preemption disabled at:
| [<8182f17e>] get_signal+0x4a6/0x7c4
| CPU: 0 PID: 57 Comm: segv Not tainted 4.17.0+ #23
|
| Stack Trace:
|  arc_unwind_core.constprop.1+0xd0/0xf4
|  __might_sleep+0x1f6/0x234
|  __get_free_pages+0x174/0xca0
|  show_regs+0x22/0x330
|  get_signal+0x4ac/0x7c4     # print_fatal_signals() -> preempt_disable()
|  do_signal+0x30/0x224
|  resume_user_mode_begin+0x90/0xd8

So signal handling core calls show_regs() with preemption disabled but
an ensuing GFP_KERNEL page allocator call is flagged by lockdep.

We could have switched to GFP_NOWAIT, but turns out that is not enough
anways and eliding page allocator call leads to less code and
instruction traces to sift thru when debugging pesky crashes.

FWIW, this patch doesn't cure the lockdep splat (which next patch does).

Reviewed-by: William Kucharski <william.kucharski@oracle.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-05 17:58:48 +01:00
..
alpha alpha: Fix Eiger NR_IRQS to 128 2019-02-20 10:25:47 +01:00
arc ARC: show_regs: lockdep: avoid page allocator... 2019-03-05 17:58:48 +01:00
arm ARM: 8834/1: Fix: kprobes: optimized kprobes illegal instruction 2019-02-27 10:08:49 +01:00
arm64 arm64/sve: ptrace: Fix SVE_PT_REGS_OFFSET definition 2019-02-12 19:47:19 +01:00
c6x kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
h8300 Kbuild updates for v4.19 (2nd) 2018-08-25 13:40:38 -07:00
hexagon hexagon: modify ffs() and fls() to return int 2018-09-10 19:42:15 -05:00
ia64 ia64: Fix allnoconfig section mismatch for ioc_init/ioc_iommu_info 2018-08-22 14:12:47 -07:00
m68k m68k: Fix memblock-related crashes 2019-01-13 09:51:02 +01:00
microblaze mm: make the __PAGETABLE_PxD_FOLDED defines non-empty 2018-12-29 13:37:57 +01:00
mips MIPS: jazz: fix 64bit build 2019-02-27 10:08:53 +01:00
nds32 nds32: Fix gcc 8.0 compiler option incompatible. 2019-02-12 19:46:57 +01:00
nios2 nios2: kconfig: remove duplicate DEBUG_STACK_USAGE symbol defintions 2018-08-27 09:47:20 +08:00
openrisc OpenRISC updates for 4.19 2018-08-23 14:09:37 -07:00
parisc parisc: Fix ptrace syscall number modification 2019-02-27 10:09:00 +01:00
powerpc powerpc/8xx: fix setting of pagetable for Abatron BDI debug tool. 2019-02-27 10:08:54 +01:00
riscv riscv: Add pte bit to distinguish swap from invalid 2019-02-20 10:25:46 +01:00
s390 s390/zcrypt: improve special ap message cmd handling 2019-02-12 19:47:04 +01:00
sh arch/sh/boards/mach-kfr2r09/setup.c: fix struct mtd_oob_ops build warning 2019-02-12 19:47:18 +01:00
sparc sparc/function_graph: Simplify with function_graph_enter() 2018-12-05 19:32:10 +01:00
um um: Avoid marking pages with "changed protection" 2019-02-12 19:47:17 +01:00
unicore32 mm: convert return type of handle_mm_fault() caller to vm_fault_t 2018-08-17 16:20:28 -07:00
x86 x86/mm/mem_encrypt: Fix erroneous sizeof() 2019-03-05 17:58:47 +01:00
xtensa xtensa: xtfpga.dtsi: fix dtc warnings about SPI 2019-02-12 19:47:05 +01:00
.gitignore
Kconfig Merge branch 'tlb-fixes' 2018-08-23 14:55:01 -07:00