All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+f8589c355cdce42b2446@syzkaller.appspotmail.com>
To: gregkh@linuxfoundation.org, jslaby@suse.com,
	linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: BUG: sleeping function called from invalid context in console_lock
Date: Sun, 17 May 2020 18:22:13 -0700	[thread overview]
Message-ID: <0000000000002746f005a5e1fe6b@google.com> (raw)

Hello,

syzbot found the following crash on:

HEAD commit:    3d1c1e59 Merge tag 'block-5.7-2020-05-16' of git://git.ker..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11a8d202100000
kernel config:  https://syzkaller.appspot.com/x/.config?x=c14212794ed9ad24
dashboard link: https://syzkaller.appspot.com/bug?extid=f8589c355cdce42b2446
compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
userspace arch: i386

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+f8589c355cdce42b2446@syzkaller.appspotmail.com

BUG: sleeping function called from invalid context at kernel/printk/printk.c:2312
in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 21174, name: syz-executor.5
3 locks held by syz-executor.5/21174:
 #0: ffff8880a965c098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:267
 #1: ffff8880a965c3f8 (&tty->flow_lock){....}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:378 [inline]
 #1: ffff8880a965c3f8 (&tty->flow_lock){....}-{2:2}, at: n_tty_ioctl_helper drivers/tty/tty_ioctl.c:914 [inline]
 #1: ffff8880a965c3f8 (&tty->flow_lock){....}-{2:2}, at: n_tty_ioctl_helper+0xcc/0x3b0 drivers/tty/tty_ioctl.c:894
 #2: ffff8880a965c098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:288
irq event stamp: 46
hardirqs last  enabled at (45): [<ffffffff81b0ba8b>] kfree+0x1eb/0x2b0 mm/slab.c:3758
hardirqs last disabled at (46): [<ffffffff87d08f35>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline]
hardirqs last disabled at (46): [<ffffffff87d08f35>] _raw_spin_lock_irq+0x35/0x80 kernel/locking/spinlock.c:167
softirqs last  enabled at (0): [<ffffffff8143deb7>] copy_process+0x1ae7/0x7110 kernel/fork.c:2031
softirqs last disabled at (0): [<0000000000000000>] 0x0
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 0 PID: 21174 Comm: syz-executor.5 Not tainted 5.7.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x188/0x20d lib/dump_stack.c:118
 ___might_sleep.cold+0x1f4/0x23d kernel/sched/core.c:6801
 console_lock+0x19/0x80 kernel/printk/printk.c:2312
 do_con_write.part.0+0x95/0x1dc0 drivers/tty/vt/vt.c:2596
 do_con_write drivers/tty/vt/vt.c:2593 [inline]
 con_write+0x41/0xe0 drivers/tty/vt/vt.c:3159
 n_hdlc_send_frames+0x22d/0x3d0 drivers/tty/n_hdlc.c:289
 tty_wakeup+0xe1/0x120 drivers/tty/tty_io.c:536
 __start_tty+0x5c/0x70 drivers/tty/tty_io.c:803
 n_tty_ioctl_helper drivers/tty/tty_ioctl.c:917 [inline]
 n_tty_ioctl_helper+0x34e/0x3b0 drivers/tty/tty_ioctl.c:894
 n_hdlc_tty_ioctl+0xd3/0x2f0 drivers/tty/n_hdlc.c:615
 tty_ioctl+0xf88/0x1440 drivers/tty/tty_io.c:2665
 tty_compat_ioctl+0x2bf/0x410 drivers/tty/tty_io.c:2834
 __do_compat_sys_ioctl fs/ioctl.c:865 [inline]
 __se_compat_sys_ioctl fs/ioctl.c:816 [inline]
 __ia32_compat_sys_ioctl+0x23d/0x2b0 fs/ioctl.c:816
 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline]
 do_fast_syscall_32+0x270/0xe90 arch/x86/entry/common.c:396
 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

             reply	other threads:[~2020-05-18  1:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18  1:22 syzbot [this message]
     [not found] <42c2c0c4-9ee2-6426-8c3c-2585e0345fcb@huawei.com>
2023-09-18 13:35 ` BUG: sleeping function called from invalid context in console_lock yiyang (D)
2023-09-18 15:19   ` Greg Kroah-Hartman
2023-09-27  7:48     ` yiyang (D)
2023-09-27  8:24       ` Greg Kroah-Hartman
2023-09-27  9:15     ` yiyang (D)
2023-09-27  9:41       ` Greg Kroah-Hartman

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=0000000000002746f005a5e1fe6b@google.com \
    --to=syzbot+f8589c355cdce42b2446@syzkaller.appspotmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.