WARNING in check_flush_dependency

44 views
Skip to first unread message

syzbot

unread,
Jan 23, 2018, 2:39:02 AM1/23/18
to da...@davemloft.net, joha...@sipsolutions.net, linux-...@vger.kernel.org, linux-w...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot hit the following crash on upstream commit
0d665e7b109d512b7cae3ccef6e8654714887844 (Fri Jan 19 12:49:24 2018 +0000)
mm, page_vma_mapped: Drop faulty pointer arithmetics in check_pte()

So far this crash happened 23 times on net-next, upstream.
C reproducer is attached.
syzkaller reproducer is attached.
Raw console output is attached.
compiler: gcc (GCC) 7.1.1 20170620
.config is attached.
user-space arch: i386

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+41cdaf...@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed. See footer for
details.
If you forward the report, please keep this part and the footer.

------------[ cut here ]------------
workqueue: WQ_MEM_RECLAIM hwsim_wq:destroy_radio is
flushing !WQ_MEM_RECLAIM events_highpri:flush_backlog
WARNING: CPU: 0 PID: 3706 at kernel/workqueue.c:2439
check_flush_dependency+0x239/0x380 kernel/workqueue.c:2435
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 3706 Comm: kworker/0:5 Not tainted 4.15.0-rc9+ #184
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Workqueue: hwsim_wq destroy_radio
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x194/0x257 lib/dump_stack.c:53
panic+0x1e4/0x41c kernel/panic.c:183
__warn+0x1dc/0x200 kernel/panic.c:547
report_bug+0x211/0x2d0 lib/bug.c:184
fixup_bug.part.11+0x37/0x80 arch/x86/kernel/traps.c:178
fixup_bug arch/x86/kernel/traps.c:247 [inline]
do_error_trap+0x2d7/0x3e0 arch/x86/kernel/traps.c:296
do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:315
invalid_op+0x22/0x40 arch/x86/entry/entry_64.S:1096
RIP: 0010:check_flush_dependency+0x239/0x380 kernel/workqueue.c:2435
RSP: 0018:ffff8801d7c2ed78 EFLAGS: 00010082
RAX: dffffc0000000008 RBX: ffff8801d42ca540 RCX: ffffffff8159ebae
RDX: 0000000000000000 RSI: 1ffff1003af85d6a RDI: ffff8801d842eb80
RBP: ffff8801d7c2eda8 R08: 0000000000000000 R09: 1ffff1003af85d3c
R10: ffff8801d7c2ec70 R11: 0000000000000005 R12: ffff8801dac14b70
R13: ffffffff8437cb60 R14: ffff8801c3368d00 R15: 0000000000000000
start_flush_work kernel/workqueue.c:2827 [inline]
flush_work+0x2f7/0x8f0 kernel/workqueue.c:2870
flush_all_backlogs net/core/dev.c:4683 [inline]
rollback_registered_many+0x672/0xdf0 net/core/dev.c:7241
unregister_netdevice_many.part.110+0x87/0x420 net/core/dev.c:8304
unregister_netdevice_many+0xbb/0x100 net/core/dev.c:8303
ieee80211_remove_interfaces+0x4b3/0x990 net/mac80211/iface.c:1960
ieee80211_unregister_hw+0x4c/0x270 net/mac80211/main.c:1181
mac80211_hwsim_del_radio+0x1ee/0x3b0
drivers/net/wireless/mac80211_hwsim.c:2789
destroy_radio+0x9d/0x100 drivers/net/wireless/mac80211_hwsim.c:3339
process_one_work+0xbbf/0x1b10 kernel/workqueue.c:2113
worker_thread+0x223/0x1990 kernel/workqueue.c:2247
kthread+0x33c/0x400 kernel/kthread.c:238
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:541
Shutting down cpus with NMI
Dumping ftrace buffer:
(ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to syzk...@googlegroups.com.

syzbot will keep track of this bug report.
If you forgot to add the Reported-by tag, once the fix for this bug is
merged
into any tree, please reply to this email with:
#syz fix: exact-commit-title
If you want to test a patch for this bug, please reply with:
#syz test: git://repo/address.git branch
and provide the patch inline or as an attachment.
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug
report.
Note: all commands must start from beginning of the line in the email body.
raw.log.txt
repro.syz.txt
repro.c.txt
config.txt

Johannes Berg

unread,
Jan 24, 2018, 2:39:31 AM1/24/18
to syzbot, da...@davemloft.net, linux-...@vger.kernel.org, linux-w...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com
On Mon, 2018-01-22 at 23:39 -0800, syzbot wrote:
> Hello,
>
> syzbot hit the following crash on upstream commit
> 0d665e7b109d512b7cae3ccef6e8654714887844 (Fri Jan 19 12:49:24 2018 +0000)
> mm, page_vma_mapped: Drop faulty pointer arithmetics in check_pte()
>
> So far this crash happened 23 times on net-next, upstream.
> C reproducer is attached.
> syzkaller reproducer is attached.
> Raw console output is attached.
> compiler: gcc (GCC) 7.1.1 20170620
> .config is attached.
> user-space arch: i386
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+41cdaf...@syzkaller.appspotmail.com
> It will help syzbot understand when the bug is fixed. See footer for
> details.
> If you forward the report, please keep this part and the footer.
>
> ------------[ cut here ]------------
> workqueue: WQ_MEM_RECLAIM hwsim_wq:destroy_radio is
> flushing !WQ_MEM_RECLAIM events_highpri:flush_backlog
> WARNING: CPU: 0 PID: 3706 at kernel/workqueue.c:2439
> check_flush_dependency+0x239/0x380 kernel/workqueue.c:2435
> Kernel panic - not syncing: panic_on_warn set ...

Yeah, we clearly shouldn't have WQ_RECLAIM set on this workqueue...

johannes

Dmitry Vyukov

unread,
Feb 19, 2018, 1:58:34 PM2/19/18
to Johannes Berg, syzbot, David Miller, LKML, linux-w...@vger.kernel.org, netdev, syzkall...@googlegroups.com
Hi Johannes,

Do you mind to send a patch to fix this?

Johannes Berg

unread,
Feb 19, 2018, 3:41:07 PM2/19/18
to Dmitry Vyukov, syzbot, David Miller, LKML, linux-w...@vger.kernel.org, netdev, syzkall...@googlegroups.com
On Mon, 2018-02-19 at 19:58 +0100, Dmitry Vyukov wrote:
>
> > Yeah, we clearly shouldn't have WQ_RECLAIM set on this workqueue...
>
> Hi Johannes,
>
> Do you mind to send a patch to fix this?

Yeah, sorry, I've been behind on patches a bit. I just applied it
today, and once I've let it sit for a day for build bot etc. I'll send
it up.

Let me double-check I've added the syzbot annotation to it though ...

johannes
Reply all
Reply to author
Forward
0 new messages