syzbot


BUG: sleeping function called from invalid context in ep_ptable_queue_proc

Status: upstream: reported C repro on 2021/12/14 16:48
Reported-by: syzbot+da7361728feac64d0c3b@syzkaller.appspotmail.com
First crash: 1103d, last: 834d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 BUG: sleeping function called from invalid context in ep_ptable_queue_proc C error 68 1075d 1103d 0/1 upstream: reported C repro on 2021/12/14 15:59
Fix bisection attempts (9)
Created Duration User Patch Repo Result
2022/10/13 02:23 0m bisect fix linux-4.14.y error job log
2022/09/10 01:02 27m bisect fix linux-4.14.y OK (0) job log log
2022/08/11 00:14 26m bisect fix linux-4.14.y OK (0) job log log
2022/07/11 23:48 26m bisect fix linux-4.14.y OK (0) job log log
2022/06/11 22:11 29m bisect fix linux-4.14.y OK (0) job log log
2022/05/12 21:49 22m bisect fix linux-4.14.y OK (0) job log log
2022/04/12 21:26 22m bisect fix linux-4.14.y OK (0) job log log
2022/03/13 21:01 24m bisect fix linux-4.14.y OK (0) job log log
2022/02/10 18:12 29m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
BUG: sleeping function called from invalid context at mm/slab.h:419
in_atomic(): 1, irqs_disabled(): 1, pid: 7980, name: syz-executor774
3 locks held by syz-executor774/7980:
 #0:  (&ep->mtx){+.+.}, at: [<ffffffff8196a296>] SYSC_epoll_ctl fs/eventpoll.c:2080 [inline]
 #0:  (&ep->mtx){+.+.}, at: [<ffffffff8196a296>] SyS_epoll_ctl+0x516/0x2780 fs/eventpoll.c:2002
 #1:  (&dev->dev_mutex){+.+.}, at: [<ffffffff84c03981>] v4l2_m2m_fop_poll+0x91/0x110 drivers/media/v4l2-core/v4l2-mem2mem.c:802
 #2:  (&(&q->done_lock)->rlock){....}, at: [<ffffffff84c02d36>] v4l2_m2m_poll+0x116/0x670 drivers/media/v4l2-core/v4l2-mem2mem.c:536
irq event stamp: 6648
hardirqs last  enabled at (6647): [<ffffffff8723f9d9>] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline]
hardirqs last  enabled at (6647): [<ffffffff8723f9d9>] _raw_spin_unlock_irqrestore+0x79/0xe0 kernel/locking/spinlock.c:192
hardirqs last disabled at (6648): [<ffffffff8723f666>] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline]
hardirqs last disabled at (6648): [<ffffffff8723f666>] _raw_spin_lock_irqsave+0x66/0xc0 kernel/locking/spinlock.c:160
softirqs last  enabled at (3068): [<ffffffff8760068b>] __do_softirq+0x68b/0x9ff kernel/softirq.c:314
softirqs last disabled at (3043): [<ffffffff81321d13>] invoke_softirq kernel/softirq.c:368 [inline]
softirqs last disabled at (3043): [<ffffffff81321d13>] irq_exit+0x193/0x240 kernel/softirq.c:409
Preemption disabled at:
[<          (null)>]           (null)
CPU: 1 PID: 7980 Comm: syz-executor774 Not tainted 4.14.258-syzkaller #0
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+0x1b2/0x281 lib/dump_stack.c:58
 ___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6041
 slab_pre_alloc_hook mm/slab.h:419 [inline]
 slab_alloc mm/slab.c:3376 [inline]
 kmem_cache_alloc+0x284/0x3c0 mm/slab.c:3550
 ep_ptable_queue_proc+0x9e/0x370 fs/eventpoll.c:1255
 poll_wait include/linux/poll.h:50 [inline]
 v4l2_m2m_poll+0x583/0x670 drivers/media/v4l2-core/v4l2-mem2mem.c:538
 v4l2_m2m_fop_poll+0xa4/0x110 drivers/media/v4l2-core/v4l2-mem2mem.c:804
 v4l2_poll+0x133/0x1d0 drivers/media/v4l2-core/v4l2-dev.c:342
 ep_item_poll fs/eventpoll.c:885 [inline]
 ep_insert fs/eventpoll.c:1490 [inline]
 SYSC_epoll_ctl fs/eventpoll.c:2117 [inline]
 SyS_epoll_ctl+0x14af/0x2780 fs/eventpoll.c:2002
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7f73a66dc1e9
RSP: 002b:00007ffd74d8c338 EFLAGS: 00000246 ORIG_RAX: 00000000000

Crashes (49):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/12/14 17:54 linux-4.14.y 9dfbac0e6b86 d018dd31 .config console log report syz C ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2022/01/11 18:12 linux-4.14.y 4ba8e26127c3 1884f55a .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2022/01/11 15:08 linux-4.14.y 4ba8e26127c3 1884f55a .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2022/01/11 12:19 linux-4.14.y bfdef05c8da4 1884f55a .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2022/01/11 08:52 linux-4.14.y bfdef05c8da4 1884f55a .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2022/01/10 23:47 linux-4.14.y bfdef05c8da4 ddb0ab8c .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2022/01/10 17:56 linux-4.14.y bfdef05c8da4 ddb0ab8c .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2022/01/07 17:13 linux-4.14.y bfdef05c8da4 2ca0d385 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2022/01/05 17:35 linux-4.14.y bfdef05c8da4 6acc789a .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2022/01/05 15:48 linux-4.14.y bfdef05c8da4 6acc789a .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2022/01/05 12:22 linux-4.14.y bfdef05c8da4 0a2584dd .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2022/01/05 01:47 linux-4.14.y a6ca7c65b137 0a2584dd .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2022/01/04 20:45 linux-4.14.y a6ca7c65b137 0a2584dd .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2022/01/04 05:44 linux-4.14.y a6ca7c65b137 7f723fbe .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2022/01/03 19:16 linux-4.14.y a6ca7c65b137 4a3f34f2 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2022/01/03 16:14 linux-4.14.y a6ca7c65b137 4a3f34f2 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2022/01/01 13:18 linux-4.14.y a6ca7c65b137 e1768e9c .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2022/01/01 06:20 linux-4.14.y a6ca7c65b137 e1768e9c .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2022/01/01 05:22 linux-4.14.y a6ca7c65b137 e1768e9c .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/31 03:11 linux-4.14.y a6ca7c65b137 36bd2e48 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/30 14:23 linux-4.14.y a6ca7c65b137 2e49f10d .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/29 16:40 linux-4.14.y a6ca7c65b137 6cc879d4 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/29 14:29 linux-4.14.y a6ca7c65b137 6cc879d4 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/29 09:27 linux-4.14.y 8ee0807eedf3 76c8cf06 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/28 17:36 linux-4.14.y 8ee0807eedf3 76c8cf06 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/28 06:06 linux-4.14.y 8ee0807eedf3 6b3c5e64 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/27 19:12 linux-4.14.y 8ee0807eedf3 5140bd58 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/26 14:08 linux-4.14.y 8ee0807eedf3 e4f103c4 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/26 12:06 linux-4.14.y 8ee0807eedf3 e4f103c4 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/26 02:29 linux-4.14.y 8ee0807eedf3 6caa12e4 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/23 23:39 linux-4.14.y 8ee0807eedf3 6caa12e4 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/22 11:43 linux-4.14.y 8ee0807eedf3 6caa12e4 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/22 10:05 linux-4.14.y 8ee0807eedf3 6caa12e4 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/21 22:49 linux-4.14.y 9dfbac0e6b86 6caa12e4 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/21 19:54 linux-4.14.y 9dfbac0e6b86 6caa12e4 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/21 12:29 linux-4.14.y 9dfbac0e6b86 a938f0b8 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/21 09:52 linux-4.14.y 9dfbac0e6b86 a938f0b8 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/20 22:07 linux-4.14.y 9dfbac0e6b86 62bd192b .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/20 11:51 linux-4.14.y 9dfbac0e6b86 021b36cb .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/20 08:38 linux-4.14.y 9dfbac0e6b86 021b36cb .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/19 19:59 linux-4.14.y 9dfbac0e6b86 44068e19 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/17 06:08 linux-4.14.y 9dfbac0e6b86 44068e19 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/17 02:39 linux-4.14.y 9dfbac0e6b86 44068e19 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/16 18:11 linux-4.14.y 9dfbac0e6b86 8dd6a5e3 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/15 20:58 linux-4.14.y 9dfbac0e6b86 572bcb40 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/15 19:47 linux-4.14.y 9dfbac0e6b86 572bcb40 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/15 02:38 linux-4.14.y 9dfbac0e6b86 f752fb53 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/15 01:50 linux-4.14.y 9dfbac0e6b86 f752fb53 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
2021/12/14 16:47 linux-4.14.y 9dfbac0e6b86 d018dd31 .config console log report info ci2-linux-4-14 BUG: sleeping function called from invalid context in ep_ptable_queue_proc
* Struck through repros no longer work on HEAD.