Re: INFO: task hung in __blkdev_get (2)

2018-09-08 Thread Tetsuo Handa
This report contains "getblk(): executed=9 bh_count=0 bh_state=0" lines.
Thus,

#syz dup: INFO: task hung in generic_file_write_iter



INFO: task hung in __blkdev_get (2)

2018-09-08 Thread syzbot

Hello,

syzbot found the following crash on:

HEAD commit:b50694381cfc Merge branch 'stable/for-linus-4.17' of git:/..
git tree:   upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=166708d780
kernel config:  https://syzkaller.appspot.com/x/.config?x=982e2df1b9e60b02
dashboard link: https://syzkaller.appspot.com/bug?extid=2a732b5a87000875c1f3
compiler:   gcc (GCC) 8.0.1 20180413 (experimental)

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+2a732b5a87000875c...@syzkaller.appspotmail.com

binder: 17633:17652 ioctl c0306201 20007000 returned -22
INFO: task syz-executor0:17586 blocked for more than 120 seconds.
  Not tainted 4.17.0-rc6+ #66
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor0   D22720 17586  16831 0x0004
Call Trace:
 context_switch kernel/sched/core.c:2859 [inline]
 __schedule+0x801/0x1e30 kernel/sched/core.c:3501
 schedule+0xef/0x430 kernel/sched/core.c:3545
 schedule_preempt_disabled+0x10/0x20 kernel/sched/core.c:3603
 __mutex_lock_common kernel/locking/mutex.c:833 [inline]
 __mutex_lock+0xe38/0x17f0 kernel/locking/mutex.c:893
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
 __blkdev_get+0x193/0x13a0 fs/block_dev.c:1460
 blkdev_get+0xb9/0xb30 fs/block_dev.c:1611
 blkdev_get_by_dev+0x3f/0x80 fs/block_dev.c:1733
 journal_init_dev fs/reiserfs/journal.c:2625 [inline]
 journal_init+0xcad/0x6a20 fs/reiserfs/journal.c:2772
 reiserfs_fill_super+0xd59/0x3900 fs/reiserfs/super.c:2034
 mount_bdev+0x30c/0x3e0 fs/super.c:1174
 get_super_block+0x34/0x40 fs/reiserfs/super.c:2605
 mount_fs+0xae/0x328 fs/super.c:1277
 vfs_kern_mount.part.34+0xd4/0x4d0 fs/namespace.c:1037
 vfs_kern_mount fs/namespace.c:1027 [inline]
 do_new_mount fs/namespace.c:2518 [inline]
 do_mount+0x564/0x3070 fs/namespace.c:2848
 ksys_mount+0x12d/0x140 fs/namespace.c:3064
 __do_sys_mount fs/namespace.c:3078 [inline]
 __se_sys_mount fs/namespace.c:3075 [inline]
 __x64_sys_mount+0xbe/0x150 fs/namespace.c:3075
 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45843a
RSP: 002b:7fc481e97ba8 EFLAGS: 0202 ORIG_RAX: 00a5
RAX: ffda RBX: 2000 RCX: 0045843a
RDX: 2000 RSI: 2100 RDI: 7fc481e97bf0
RBP: 0001 R08: 20013900 R09: 2000
R10:  R11: 0202 R12: 0019
R13: 0001 R14: 006fed68 R15: 

Showing all locks held in the system:
2 locks held by khungtaskd/894:
 #0: 555ac416 (rcu_read_lock){}, at:  
check_hung_uninterruptible_tasks kernel/hung_task.c:175 [inline]
 #0: 555ac416 (rcu_read_lock){}, at: watchdog+0x1ff/0xf60  
kernel/hung_task.c:249
 #1: dd73bdbb (tasklist_lock){.+.+}, at:  
debug_show_all_locks+0xde/0x34a kernel/locking/lockdep.c:4470

1 lock held by rsyslogd/4380:
 #0: ca6266dd (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x1a9/0x1e0  
fs/file.c:766

2 locks held by getty/4470:
 #0: 1d015e21 (&tty->ldisc_sem){}, at:  
ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
 #1: 0d332adb (&ldata->atomic_read_lock){+.+.}, at:  
n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131

2 locks held by getty/4471:
 #0: 48bf8be6 (&tty->ldisc_sem){}, at:  
ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
 #1: 23f3c5d7 (&ldata->atomic_read_lock){+.+.}, at:  
n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131

2 locks held by getty/4472:
 #0: 6b8ddf0c (&tty->ldisc_sem){}, at:  
ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
 #1: 61b8fb1b (&ldata->atomic_read_lock){+.+.}, at:  
n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131

2 locks held by getty/4473:
 #0: 7a3e9951 (&tty->ldisc_sem){}, at:  
ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
 #1: cc33e1ac (&ldata->atomic_read_lock){+.+.}, at:  
n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131

2 locks held by getty/4474:
 #0: d4d7bced (&tty->ldisc_sem){}, at:  
ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
 #1: cea9fd89 (&ldata->atomic_read_lock){+.+.}, at:  
n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131

2 locks held by getty/4475:
 #0: c455607f (&tty->ldisc_sem){}, at:  
ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
 #1: 74a85a34 (&ldata->atomic_read_lock){+.+.}, at:  
n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131

2 locks held by getty/4476:
 #0: 0dda4794 (&tty->ldisc_sem){}, at:  
ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
 #1: 96899971 (&ldata->atomic_read_lock){+.+.}, at:  
n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131

2 locks held by syz-executor0/17586:
 #0: a67274d0 (&type->s_umount_key#20/1){+.+.}, at: alloc_super  
fs/super.c:223 [inl