WARNING in __vb2_queue_cancel

30 views
Skip to first unread message

syzbot

unread,
Apr 20, 2019, 8:06:10 AM4/20/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 68d7a45e Linux 4.14.113
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16f5ef2d200000
kernel config: https://syzkaller.appspot.com/x/.config?x=dbf1fde4d7489e1c
dashboard link: https://syzkaller.appspot.com/bug?extid=48005d53f4cee47f763f
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16e0ca47200000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=131ae17b200000

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

------------[ cut here ]------------
WARNING: CPU: 1 PID: 7202 at drivers/media/v4l2-core/videobuf2-core.c:1663
__vb2_queue_cancel+0x5ab/0x8a0 drivers/media/v4l2-core/videobuf2-core.c:1663
Kernel panic - not syncing: panic_on_warn set ...

CPU: 1 PID: 7202 Comm: syz-executor604 Not tainted 4.14.113 #3
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x138/0x19c lib/dump_stack.c:53
panic+0x1f2/0x438 kernel/panic.c:182
__warn.cold+0x2f/0x34 kernel/panic.c:546
report_bug+0x216/0x254 lib/bug.c:186
fixup_bug arch/x86/kernel/traps.c:177 [inline]
fixup_bug arch/x86/kernel/traps.c:172 [inline]
do_error_trap+0x1bb/0x310 arch/x86/kernel/traps.c:295
do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:314
invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:944
RIP: 0010:__vb2_queue_cancel+0x5ab/0x8a0
drivers/media/v4l2-core/videobuf2-core.c:1663
RSP: 0018:ffff88807f49fae0 EFLAGS: 00010297
RAX: ffff88809f9d8700 RBX: ffffffff842c0050 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000002 RDI: ffff88809eed3e2e
RBP: ffff88807f49fb50 R08: ffff88809f9d8700 R09: 0000000000000001
R10: ffff88807f49fa40 R11: ffff88807f49f9c7 R12: ffff88809eed5d64
R13: ffff88809eed5e38 R14: ffff88809eed5e40 R15: ffff88809eed5b60
vb2_core_streamoff+0x52/0x110 drivers/media/v4l2-core/videobuf2-core.c:1788
__vb2_cleanup_fileio+0x78/0x150
drivers/media/v4l2-core/videobuf2-core.c:2313
vb2_core_queue_release+0x1d/0x80
drivers/media/v4l2-core/videobuf2-core.c:2040
vb2_queue_release drivers/media/v4l2-core/videobuf2-v4l2.c:669 [inline]
_vb2_fop_release+0x1cf/0x2a0 drivers/media/v4l2-core/videobuf2-v4l2.c:840
vb2_fop_release+0x75/0xc0 drivers/media/v4l2-core/videobuf2-v4l2.c:854
vivid_fop_release+0x180/0x3f0 drivers/media/platform/vivid/vivid-core.c:486
v4l2_release+0xfb/0x190 drivers/media/v4l2-core/v4l2-dev.c:446
__fput+0x277/0x7a0 fs/file_table.c:210
____fput+0x16/0x20 fs/file_table.c:244
task_work_run+0x119/0x190 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x7df/0x2c10 kernel/exit.c:874
do_group_exit+0x111/0x330 kernel/exit.c:977
SYSC_exit_group kernel/exit.c:988 [inline]
SyS_exit_group+0x1d/0x20 kernel/exit.c:986
do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x443f18
RSP: 002b:00007ffeea3790a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443f18
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c42d0 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d6180 R14: 0000000000000000 R15: 0000000000000000
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
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 syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Apr 25, 2019, 6:13:06 AM4/25/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: c98875d9 Linux 4.19.36
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16ab7a04a00000
kernel config: https://syzkaller.appspot.com/x/.config?x=5e40ac5fbcc6366d
dashboard link: https://syzkaller.appspot.com/bug?extid=b167378e6d839357cdf7
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12548d90a00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15144ccca00000

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

WARNING: CPU: 1 PID: 8351 at
drivers/media/common/videobuf2/videobuf2-core.c:1670
__vb2_queue_cancel+0x635/0x970
drivers/media/common/videobuf2/videobuf2-core.c:1670
Kernel panic - not syncing: panic_on_warn set ...

CPU: 1 PID: 8351 Comm: syz-executor945 Not tainted 4.19.36 #4
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+0x172/0x1f0 lib/dump_stack.c:113
panic+0x263/0x51d kernel/panic.c:185
__warn.cold+0x20/0x54 kernel/panic.c:540
report_bug+0x263/0x2b0 lib/bug.c:186
fixup_bug arch/x86/kernel/traps.c:178 [inline]
fixup_bug arch/x86/kernel/traps.c:173 [inline]
do_error_trap+0x204/0x360 arch/x86/kernel/traps.c:296
do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:316
invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:997
RIP: 0010:__vb2_queue_cancel+0x635/0x970
drivers/media/common/videobuf2/videobuf2-core.c:1670
Code: 03 0f 8e ce 02 00 00 41 8b 5c 24 20 e9 c1 fc ff ff e8 2f ed c7 fc 48
83 c4 48 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 1b ed c7 fc <0f> 0b 49 8d 85
28 02 00 00 48 89 c2 48 89 45 a0 48 b8 00 00 00 00
RSP: 0018:ffff888083fdfae8 EFLAGS: 00010293
RAX: ffff888089924500 RBX: 0000000000000001 RCX: ffffffff84a352c7
RDX: 0000000000000000 RSI: ffffffff84a357f5 RDI: 0000000000000005
RBP: ffff888083fdfb58 R08: ffff888089924500 R09: ffffed1013d1abc8
R10: ffffed1013d1abc7 R11: ffff88809e8d5e3f R12: ffff88809e8d5e3c
R13: ffff88809e8d5bf8 R14: ffff88809e8d5ed8 R15: ffff88809e8d5ed0
vb2_core_streamoff+0x60/0x140
drivers/media/common/videobuf2/videobuf2-core.c:1796
__vb2_cleanup_fileio+0x78/0x170
drivers/media/common/videobuf2/videobuf2-core.c:2323
vb2_core_queue_release+0x20/0x80
drivers/media/common/videobuf2/videobuf2-core.c:2050
vb2_queue_release drivers/media/common/videobuf2/videobuf2-v4l2.c:671
[inline]
_vb2_fop_release+0x1cf/0x2a0
drivers/media/common/videobuf2/videobuf2-v4l2.c:842
vb2_fop_release+0x75/0xc0
drivers/media/common/videobuf2/videobuf2-v4l2.c:856
vivid_fop_release+0x18e/0x430 drivers/media/platform/vivid/vivid-core.c:474
v4l2_release+0xfb/0x1a0 drivers/media/v4l2-core/v4l2-dev.c:448
__fput+0x2df/0x8b0 fs/file_table.c:278
____fput+0x16/0x20 fs/file_table.c:309
task_work_run+0x14a/0x1c0 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x933/0x2fa0 kernel/exit.c:876
do_group_exit+0x135/0x370 kernel/exit.c:979
__do_sys_exit_group kernel/exit.c:990 [inline]
__se_sys_exit_group kernel/exit.c:988 [inline]
__x64_sys_exit_group+0x44/0x50 kernel/exit.c:988
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x443b78
Code: 00 00 be 3c 00 00 00 eb 19 66 0f 1f 84 00 00 00 00 00 48 89 d7 89 f0
0f 05 48 3d 00 f0 ff ff 77 21 f4 48 89 d7 44 89 c0 0f 05 <48> 3d 00 f0 ff
ff 76 e0 f7 d8 64 41 89 01 eb d8 0f 1f 84 00 00 00
RSP: 002b:00007fff363c7998 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443b78
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c34f0 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d5180 R14: 0000000000000000 R15: 0000000000000000

syzbot

unread,
Dec 22, 2019, 8:21:00 PM12/22/19
to syzkaller...@googlegroups.com
syzbot suspects this bug was fixed by commit:

commit 467052f6ea5a51524992e43f02b543550495c391
Author: Alexander Popov <alex....@linux.com>
Date: Sun Nov 3 22:17:19 2019 +0000

media: vivid: Fix wrong locking that causes race conditions on
streaming stop

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=103521fee00000
start commit: c63ee293 Linux 4.19.85
git tree: linux-4.19.y
kernel config: https://syzkaller.appspot.com/x/.config?x=cbfad1c8058581ad
dashboard link: https://syzkaller.appspot.com/bug?extid=b167378e6d839357cdf7
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=117a638ce00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13f97d5ae00000

If the result looks correct, please mark the bug fixed by replying with:

#syz fix: media: vivid: Fix wrong locking that causes race conditions on
streaming stop

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages