linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Vlastimil Babka <vbabka@suse.cz>, Jiri Slaby <jslaby@suse.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>,
	linux-mm@kvack.org, Petr Mladek <pmladek@suse.cz>,
	Steven Rostedt <rostedt@goodmis.org>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [4.18 rc7] BUG: sleeping function called from invalid context at mm/slab.h:421
Date: Wed, 8 Aug 2018 19:40:41 +0900	[thread overview]
Message-ID: <20180808104041.GA873@jagdpanzerIV> (raw)
In-Reply-To: <bd7f3ea4-d9a8-e437-9936-ee4513b47ac1@suse.cz>

Hello,

On (08/08/18 11:01), Vlastimil Babka wrote:
> On 08/08/2018 05:50 AM, Mikhail Gavrilov wrote:
> > Hi guys.
> > I am catched new bug.
> > Can anyone look?
> 
> fbcon_startup() calls kzalloc(sizeof(struct fbcon_ops), GFP_KERNEL) so
> it tells slab it can sleep. The problem must be higher in the stack,
> CCing printk people.

Cc-ing fbcon/vt people. I'm not sure I know how exactly console
takeover is expected to work.

printk must be atomic, we can't sleep in console drivers [e.g. printk
from IRQs, etc.]

> > [226995.988988] BUG: sleeping function called from invalid context at
> > mm/slab.h:421
> > [226995.988988] in_atomic(): 1, irqs_disabled(): 1, pid: 22658, name: gsd-rfkill
> > [226995.988989] INFO: lockdep is turned off.
> > [226995.988989] irq event stamp: 0
> > [226995.988990] hardirqs last  enabled at (0): [<0000000000000000>]
> >        (null)
> > [226995.988991] hardirqs last disabled at (0): [<ffffffffa00b6b4a>]
> > copy_process.part.32+0x72a/0x1e60
> > [226995.988991] softirqs last  enabled at (0): [<ffffffffa00b6b4a>]
> > copy_process.part.32+0x72a/0x1e60
> > [226995.988992] softirqs last disabled at (0): [<0000000000000000>]
> >        (null)
> > [226995.988993] CPU: 6 PID: 22658 Comm: gsd-rfkill Tainted: G        W
> >         4.18.0-0.rc7.git1.1.fc29.x86_64 #1
> > [226995.988993] Hardware name: Gigabyte Technology Co., Ltd.
> > Z87M-D3H/Z87M-D3H, BIOS F11 08/12/2014
> > [226995.988994] Call Trace:
> > [226995.988994]  dump_stack+0x85/0xc0
> > [226995.988995]  ___might_sleep.cold.72+0xac/0xbc
> > [226995.988995]  kmem_cache_alloc_trace+0x202/0x2f0
> > [226995.988996]  ? fbcon_startup+0xae/0x300
> > [226995.988996]  fbcon_startup+0xae/0x300
> > [226995.988997]  do_take_over_console+0x6d/0x180
> > [226995.988997]  do_fbcon_takeover+0x58/0xb0
> > [226995.988997]  fbcon_output_notifier.cold.35+0x5/0x23
> > [226995.988998]  notifier_call_chain+0x39/0x90
> > [226995.988999]  vt_console_print+0x363/0x420
> > [226995.988999]  console_unlock+0x422/0x610
> > [226995.988999]  vprintk_emit+0x268/0x540
> > [226995.989000]  printk+0x58/0x6f
> > [226995.989000]  rfkill_fop_release.cold.16+0xc/0x11 [rfkill]
> > [226995.989001]  __fput+0xc7/0x250
> > [226995.989001]  task_work_run+0xa1/0xd0
> > [226995.989002]  exit_to_usermode_loop+0xd8/0xe0
> > [226995.989002]  do_syscall_64+0x1df/0x1f0
> > [226995.989003]  entry_SYSCALL_64_after_hwframe+0x49/0xbe

	-ss

      parent reply	other threads:[~2018-08-08 10:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-08  3:50 [4.18 rc7] BUG: sleeping function called from invalid context at mm/slab.h:421 Mikhail Gavrilov
2018-08-08  9:01 ` Vlastimil Babka
2018-08-08  9:05   ` Vlastimil Babka
2018-08-08 11:36     ` lock recursion - was: " Petr Mladek
2018-08-14  5:10       ` Mikhail Gavrilov
2018-08-08 10:40   ` Sergey Senozhatsky [this message]

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=20180808104041.GA873@jagdpanzerIV \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mikhail.v.gavrilov@gmail.com \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.cz \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=vbabka@suse.cz \
    /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;
as well as URLs for NNTP newsgroup(s).