syzbot


BUG: sleeping function called from invalid context in __get_free_pages

Status: upstream: reported syz repro on 2022/07/17 06:24
Reported-by: syzbot+d34bae418241d877cc76@syzkaller.appspotmail.com
First crash: 888d, last: 888d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 BUG: sleeping function called from invalid context in __get_free_pages syz error 1 784d 888d 0/1 upstream: reported syz repro on 2022/07/17 06:57

Sample crash report:
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50
wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50
IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
BUG: sleeping function called from invalid context at mm/page_alloc.c:4344
in_atomic(): 1, irqs_disabled(): 1, pid: 8382, name: syz-executor.0
2 locks held by syz-executor.0/8382:
 #0: 00000000cb8bcfb5 (&dev->dev_mutex){+.+.}, at: v4l2_m2m_fop_poll+0x91/0x110 drivers/media/v4l2-core/v4l2-mem2mem.c:1056
 #1: 00000000b6ddc267 (&(&q->done_lock)->rlock){....}, at: v4l2_m2m_poll+0x199/0x720 drivers/media/v4l2-core/v4l2-mem2mem.c:628
irq event stamp: 18662
hardirqs last  enabled at (18661): [<ffffffff881950e9>] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline]
hardirqs last  enabled at (18661): [<ffffffff881950e9>] _raw_spin_unlock_irqrestore+0x79/0xe0 kernel/locking/spinlock.c:184
hardirqs last disabled at (18662): [<ffffffff88194d76>] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline]
hardirqs last disabled at (18662): [<ffffffff88194d76>] _raw_spin_lock_irqsave+0x66/0xc0 kernel/locking/spinlock.c:152
softirqs last  enabled at (11228): [<ffffffff88400678>] __do_softirq+0x678/0x980 kernel/softirq.c:318
softirqs last disabled at (11023): [<ffffffff813927d5>] invoke_softirq kernel/softirq.c:372 [inline]
softirqs last disabled at (11023): [<ffffffff813927d5>] irq_exit+0x215/0x260 kernel/softirq.c:412
Preemption disabled at:
[<0000000000000000>]           (null)
CPU: 1 PID: 8382 Comm: syz-executor.0 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 ___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6192
 prepare_alloc_pages mm/page_alloc.c:4344 [inline]
 __alloc_pages_nodemask+0x593/0x2890 mm/page_alloc.c:4393
 alloc_pages_current+0x193/0x2a0 mm/mempolicy.c:2197
 alloc_pages include/linux/gfp.h:532 [inline]
 __get_free_pages+0x8/0x40 mm/page_alloc.c:4443
 poll_get_entry fs/select.c:170 [inline]
 __pollwait+0x279/0x430 fs/select.c:225
 poll_wait include/linux/poll.h:51 [inline]
 v4l2_m2m_poll+0x583/0x720 drivers/media/v4l2-core/v4l2-mem2mem.c:639
 v4l2_m2m_fop_poll+0xa4/0x110 drivers/media/v4l2-core/v4l2-mem2mem.c:1058
 v4l2_poll+0x146/0x1f0 drivers/media/v4l2-core/v4l2-dev.c:350
 vfs_poll include/linux/poll.h:90 [inline]
 do_pollfd fs/select.c:825 [inline]
 do_poll fs/select.c:873 [inline]
 do_sys_poll+0x501/0xd30 fs/select.c:967
 __do_sys_poll fs/select.c:1024 [inline]
 __se_sys_poll+0x12e/0x3f0 fs/select.c:1012
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fd99f74f199
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffde8ec4f78 EFLAGS: 00000246 ORIG_RAX: 0000000000000007
RAX: ffffffffffffffda RBX: 00007fd99f861f60 RCX: 00007fd99f74f199
RDX: 000000000000009f RSI: 000000000000000a RDI: 00000000200003c0
RBP: 00007fd99f7a913b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fd99f866c28 R14: 00007fd99f861f60 R15: 0000000000000000

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/07/17 06:37 linux-4.19.y 3f8a27f9e27b 95cb00d1 .config console log report syz ci2-linux-4-19 BUG: sleeping function called from invalid context in __get_free_pages
2022/07/17 06:23 linux-4.19.y 3f8a27f9e27b 95cb00d1 .config console log report info ci2-linux-4-19 BUG: sleeping function called from invalid context in __get_free_pages
* Struck through repros no longer work on HEAD.