kernel-fxtec-pro1x/arch/arc
Vineet Gupta 4749ffdfbb ARC: show_regs: lockdep: avoid page allocator...
[ Upstream commit ab6c03676cb190156603cf4c5ecf97aa406c9c53 ]

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
..
boot
configs arc: [devboards] Add support of NFSv3 ACL 2018-12-08 12:59:10 +01:00
include ARC: fix __ffs return value to avoid build warnings 2019-03-05 17:58:48 +01:00
kernel ARC: show_regs: lockdep: avoid page allocator... 2019-03-05 17:58:48 +01:00
lib ARCv2: lib: memeset: fix doing prefetchw outside of buffer 2019-01-31 08:14:35 +01:00
mm ARC: adjust memblock_reserve of kernel memory 2019-01-31 08:14:35 +01:00
oprofile
plat-axs10x
plat-eznps
plat-hsdk
plat-sim
plat-tb10x
Kbuild
Kconfig clocksource/drivers/arc_timer: Utilize generic sched_clock 2019-01-09 17:38:42 +01:00
Kconfig.debug
Makefile ARC: change defconfig defaults to ARCv2 2018-12-08 12:59:10 +01:00