BUG: sleeping function called from invalid context in __get_free_pages

11 views
Skip to first unread message

syzbot

unread,
Jul 17, 2022, 2:24:19 AM7/17/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=176c1e62080000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=d34bae418241d877cc76
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)

Unfortunately, I don't have any reproducer for this issue yet.

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

BUG: sleeping function called from invalid context at mm/page_alloc.c:4344
in_atomic(): 1, irqs_disabled(): 1, pid: 30912, name: syz-executor.3
2 locks held by syz-executor.3/30912:
#0: 00000000f6b371fd (&dev->dev_mutex){+.+.}, at: v4l2_m2m_fop_poll+0x91/0x110 drivers/media/v4l2-core/v4l2-mem2mem.c:1056
#1: 00000000ba6ae05a (&(&q->done_lock)->rlock){....}, at: v4l2_m2m_poll+0x199/0x720 drivers/media/v4l2-core/v4l2-mem2mem.c:628
irq event stamp: 72
hardirqs last enabled at (71): [<ffffffff881950e9>] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline]
hardirqs last enabled at (71): [<ffffffff881950e9>] _raw_spin_unlock_irqrestore+0x79/0xe0 kernel/locking/spinlock.c:184
hardirqs last disabled at (72): [<ffffffff88194d76>] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline]
hardirqs last disabled at (72): [<ffffffff88194d76>] _raw_spin_lock_irqsave+0x66/0xc0 kernel/locking/spinlock.c:152
softirqs last enabled at (0): [<ffffffff81370d39>] copy_process.part.0+0x15b9/0x8260 kernel/fork.c:1856
softirqs last disabled at (0): [<0000000000000000>] (null)
Preemption disabled at:
[<0000000000000000>] (null)
CPU: 0 PID: 30912 Comm: syz-executor.3 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:0x7f9430bea199
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:00007f942f53e168 EFLAGS: 00000246 ORIG_RAX: 0000000000000007
RAX: ffffffffffffffda RBX: 00007f9430cfd030 RCX: 00007f9430bea199
RDX: 000000000000009f RSI: 000000000000000a RDI: 00000000200003c0
RBP: 00007f9430c4413b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcad60027f R14: 00007f942f53e300 R15: 0000000000022000
netlink: 20 bytes leftover after parsing attributes in process `syz-executor.0'.
netlink: 20 bytes leftover after parsing attributes in process `syz-executor.0'.
netlink: 20 bytes leftover after parsing attributes in process `syz-executor.0'.
netlink: 20 bytes leftover after parsing attributes in process `syz-executor.0'.


---
This report 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 issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Jul 17, 2022, 2:38:22 AM7/17/22
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13e37b8c080000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=d34bae418241d877cc76
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=122a16dc080000

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

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

syzbot

unread,
Jul 17, 2022, 2:57:23 AM7/17/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 424a46ea058e Linux 4.14.288
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1448958c080000
kernel config: https://syzkaller.appspot.com/x/.config?x=73682fefcf4b3022
dashboard link: https://syzkaller.appspot.com/bug?extid=195fadf8cc8afa52653d
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=179eeaac080000

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

IPv6: ADDRCONF(NETDEV_CHANGE): macvtap0: link becomes ready
batman_adv: batadv0: Interface activated: batadv_slave_1
IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
BUG: sleeping function called from invalid context at mm/page_alloc.c:4129
in_atomic(): 1, irqs_disabled(): 1, pid: 8236, name: syz-executor.0
2 locks held by syz-executor.0/8236:
#0: (&dev->dev_mutex){+.+.}, at: [<ffffffff84bfed91>] v4l2_m2m_fop_poll+0x91/0x110 drivers/media/v4l2-core/v4l2-mem2mem.c:802
#1: (&(&q->done_lock)->rlock){....}, at: [<ffffffff84bfe19f>] v4l2_m2m_poll+0x16f/0x670 drivers/media/v4l2-core/v4l2-mem2mem.c:541
irq event stamp: 17684
hardirqs last enabled at (17683): [<ffffffff8723f209>] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline]
hardirqs last enabled at (17683): [<ffffffff8723f209>] _raw_spin_unlock_irqrestore+0x79/0xe0 kernel/locking/spinlock.c:192
hardirqs last disabled at (17684): [<ffffffff8723ee96>] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline]
hardirqs last disabled at (17684): [<ffffffff8723ee96>] _raw_spin_lock_irqsave+0x66/0xc0 kernel/locking/spinlock.c:160
softirqs last enabled at (7742): [<ffffffff8760068b>] __do_softirq+0x68b/0x9ff kernel/softirq.c:314
softirqs last disabled at (7575): [<ffffffff81321cf3>] invoke_softirq kernel/softirq.c:368 [inline]
softirqs last disabled at (7575): [<ffffffff81321cf3>] irq_exit+0x193/0x240 kernel/softirq.c:409
Preemption disabled at:
[< (null)>] (null)
CPU: 0 PID: 8236 Comm: syz-executor.0 Not tainted 4.14.288-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
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
prepare_alloc_pages mm/page_alloc.c:4129 [inline]
__alloc_pages_nodemask+0x56a/0x2720 mm/page_alloc.c:4179
alloc_pages_current+0x155/0x260 mm/mempolicy.c:2107
alloc_pages include/linux/gfp.h:520 [inline]
__get_free_pages+0xb/0x40 mm/page_alloc.c:4233
poll_get_entry fs/select.c:170 [inline]
__pollwait+0x233/0x3f0 fs/select.c:225
poll_wait include/linux/poll.h:50 [inline]
v4l2_m2m_poll+0x4d2/0x670 drivers/media/v4l2-core/v4l2-mem2mem.c:552
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
do_pollfd fs/select.c:826 [inline]
do_poll fs/select.c:876 [inline]
do_sys_poll+0x522/0xc50 fs/select.c:970
SYSC_poll fs/select.c:1027 [inline]
SyS_poll+0xf4/0x390 fs/select.c:1015
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7f4c649cc199
RSP: 002b:00007fff20265c58 EFLAGS: 00000246 ORIG_RAX: 0000000000000007
RAX: ffffffffffffffda RBX: 00007f4c64adef60 RCX: 00007f4c649cc199
RDX: 000000000000009f RSI: 000000000000000a RDI: 00000000200003c0
RBP: 00007f4c64a2613b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f4c64ae3c28 R14: 00007f4c64adef60 R15: 0000000000000000


---
This report 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 issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches
Reply all
Reply to author
Forward
0 new messages