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 92a52067 P4D 92a52067 PUD 92a4e067 PMD 0 Oops: 0002 [#1] PREEMPT SMP KASAN Modules linked in: CPU: 0 PID: 7394 Comm: syz-executor267 Not tainted 4.14.113 #3 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8880a121a0c0 task.stack: ffff88808ae80000 RIP: 0010:atomic_inc arch/x86/include/asm/atomic.h:92 [inline] RIP: 0010:kthread_stop+0x4c/0x650 kernel/kthread.c:525 RSP: 0018:ffff88808ae87a20 EFLAGS: 00010297 RAX: ffff8880a121a0c0 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0000000000000286 RBP: ffff88808ae87a40 R08: ffff8880a121a0c0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff88809bc90730 R14: ffff88809bc90728 R15: ffffffff89bb9b80 FS: 000000000108d880(0000) GS:ffff8880aee00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000020 CR3: 0000000092a4c000 CR4: 00000000001406f0 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 __vb2_queue_cancel+0xa6/0x8a0 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+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:0x443b78 RSP: 002b:00007fffdb2d3b78 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443b78 RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 RBP: 00000000004c34f0 R08: 00000000000000e7 R09: ffffffffffffffd0 R10: 000000000000000f R11: 0000000000000246 R12: 0000000000000001 R13: 00000000006d5180 R14: 0000000000000000 R15: 0000000000000000 Code: 00 65 8b 1d 67 2f c3 7e 83 fb 3f 0f 87 63 04 00 00 e8 29 95 1e 00 89 db 48 0f a3 1d 7f 93 e6 06 0f 82 4c 03 00 00 e8 14 95 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: ffff88808ae87a20 RIP: kthread_stop+0x4c/0x650 kernel/kthread.c:525 RSP: ffff88808ae87a20 CR2: 0000000000000020 ---[ end trace 88b3314bc4a09a79 ]---