BUG: unable to handle kernel NULL pointer dereference at 0000000000000020 IP: atomic_inc arch/x86/include/asm/atomic.h:92 [inline] IP: kthread_stop+0x4c/0x650 kernel/kthread.c:525 PGD 92ee3067 P4D 92ee3067 PUD 93c83067 PMD 0 Oops: 0002 [#1] PREEMPT SMP KASAN Modules linked in: CPU: 0 PID: 10543 Comm: syz-executor.5 Not tainted 4.14.128 #22 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff888061e5a540 task.stack: ffff88805f320000 RIP: 0010:atomic_inc arch/x86/include/asm/atomic.h:92 [inline] RIP: 0010:kthread_stop+0x4c/0x650 kernel/kthread.c:525 kobject: 'loop4' (ffff8880a4a94a20): kobject_uevent_env RSP: 0018:ffff88805f327b50 EFLAGS: 00010212 RAX: 0000000000040000 RBX: 0000000000000000 RCX: ffffc9000824f000 RDX: 0000000000000968 RSI: ffffffff813e150c RDI: 0000000000000286 kobject: 'loop4' (ffff8880a4a94a20): fill_kobj_path: path = '/devices/virtual/block/loop4' RBP: ffff88805f327b70 R08: ffff888061e5a540 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff888082ec7a30 R14: ffff888082ec7a28 R15: ffffffff89bb8be0 FS: 00007f7c6395f700(0000) GS:ffff8880aee00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000020 CR3: 0000000092e74000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 kobject: 'loop2' (ffff8880a4a2b1e0): kobject_uevent_env DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: vivid_stop_generating_vid_cap+0x1b9/0x664 drivers/media/platform/vivid/vivid-kthread-cap.c:934 vid_cap_stop_streaming+0x7c/0xd0 drivers/media/platform/vivid/vivid-vid-cap.c:273 kobject: 'loop2' (ffff8880a4a2b1e0): fill_kobj_path: path = '/devices/virtual/block/loop2' __vb2_queue_cancel+0xa3/0x890 drivers/media/v4l2-core/videobuf2-core.c:1655 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+0xf9/0x190 drivers/media/v4l2-core/v4l2-dev.c:446 __fput+0x275/0x7a0 fs/file_table.c:210 ____fput+0x16/0x20 fs/file_table.c:244 task_work_run+0x114/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1da/0x220 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4bc/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x4592c9 RSP: 002b:00007f7c6395ec78 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000001 RCX: 00000000004592c9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f7c6395f6d4 R13: 00000000004f8052 R14: 00000000004d0e30 R15: 00000000ffffffff Code: 00 65 8b 1d 47 6c c3 7e 83 fb 3f 0f 87 5e 04 00 00 e8 89 92 1e 00 89 db 48 0f a3 1d df f7 e6 06 0f 82 47 03 00 00 e8 74 92 1e 00 41 ff 44 24 20 49 8d 7c 24 24 48 b8 00 00 00 00 00 fc ff df RIP: atomic_inc arch/x86/include/asm/atomic.h:92 [inline] RSP: ffff88805f327b50 RIP: kthread_stop+0x4c/0x650 kernel/kthread.c:525 RSP: ffff88805f327b50 CR2: 0000000000000020 ---[ end trace d14bb34b20123d70 ]--- kobject: 'loop3' (ffff8880a4a02120): kobject_uevent_env