linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: William Kucharski <william.kucharski@oracle.com>
To: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: linux-snps-arc@lists.infradead.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH 1/2] ARC: show_regs: avoid page allocator
Date: Wed, 19 Dec 2018 13:46:15 -0700	[thread overview]
Message-ID: <114881A8-8960-4436-AAE4-DE40BFFCFB4B@oracle.com> (raw)
In-Reply-To: <1545159239-30628-2-git-send-email-vgupta@synopsys.com>


> On Dec 18, 2018, at 11:53 AM, Vineet Gupta <Vineet.Gupta1@synopsys.com> wrote:
> 
> Use on-stack smaller buffers instead of dynamic pages.
> 
> The motivation for this change was to address lockdep splat when
> signal handling code calls show_regs (with preemption disabled) and
> ARC show_regs calls into sleepable page allocator.
> 
> | 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
> 
> Despite this, lockdep still barfs (see next change), but this patch
> still has merit as in we use smaller/localized buffers now and there's
> less instructoh trace to sift thru when debugging pesky issues.
> 
> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>

I would rather see 256 as a #define somewhere rather than a magic number sprinkled
around arch/arc/kernel/troubleshoot.c.

Still, that's what the existing code does, so I suppose it's OK.

Otherwise the change looks good.

Reviewed-by: William Kucharski <william.kucharski@oracle.com>

  parent reply	other threads:[~2018-12-19 20:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-18 18:53 [PATCH 0/2] ARC show_regs fixes Vineet Gupta
2018-12-18 18:53 ` [PATCH 1/2] ARC: show_regs: avoid page allocator Vineet Gupta
2018-12-19 17:04   ` Eugeniy Paltsev
2018-12-19 17:36     ` Vineet Gupta
2018-12-20  1:16     ` Vineet Gupta
2018-12-20 13:30       ` Tetsuo Handa
2018-12-20 18:36         ` Vineet Gupta
2018-12-20 18:43         ` Vineet Gupta
2018-12-19 20:46   ` William Kucharski [this message]
2018-12-19 21:36     ` Vineet Gupta
2018-12-20 12:57   ` Michal Hocko
2018-12-20 18:38     ` Vineet Gupta
2018-12-18 18:53 ` [PATCH 2/2] ARC: show_regs: fix lockdep splat for good Vineet Gupta
2018-12-20 13:04   ` Michal Hocko
2018-12-20 18:45     ` Vineet Gupta
2018-12-21 13:04       ` Michal Hocko
2018-12-21 13:27         ` Michal Hocko
2018-12-21 17:55         ` Vineet Gupta
2018-12-21 17:55           ` Vineet Gupta
2018-12-24 19:10           ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=114881A8-8960-4436-AAE4-DE40BFFCFB4B@oracle.com \
    --to=william.kucharski@oracle.com \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox