bisecting cause commit starting from 60ec7fcfe76892a1479afab51ff17a4281923156 building syzkaller on 44068e196185e2f5a7c94629b6245cdde008b140 testing commit 60ec7fcfe76892a1479afab51ff17a4281923156 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 8c7352d46ca32927f1d6212d5aaf631f3b05cb25533f3de15ed459c9166ef700 run #0: OK run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK run #10: OK run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: crashed: WARNING in ieee80211_vif_release_channel run #18: crashed: WARNING in ieee80211_vif_release_channel run #19: crashed: WARNING in ieee80211_vif_release_channel reproducer seems to be flaky testing release v5.15 testing commit 8bb7eca972ad531c9b149c0a51ab43a417385813 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 71323c101898a9d6190815ff9f0f1d0fc16010a2b4108dab910da9879ec0438d run #0: OK run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK run #10: OK run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: crashed: WARNING in ieee80211_vif_release_channel testing release v5.14 testing commit 7d2a07b769330c34b4deabeed939325c77a7ec2f compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: fdfe9d68da08535da6f5146b3990d2c60178dfb0664c0fc62d32fedb96568655 all runs: OK # git bisect start 8bb7eca972ad531c9b149c0a51ab43a417385813 7d2a07b769330c34b4deabeed939325c77a7ec2f Bisecting: 6693 revisions left to test after this (roughly 13 steps) warning: unable to access '/syzkaller/.config/git/ignore': Permission denied warning: unable to access '/syzkaller/.config/git/attributes': Permission denied [477f70cd2a67904e04c2c2b9bd0fa2e95222f2f6] Merge tag 'drm-next-2021-08-31-1' of git://anongit.freedesktop.org/drm/drm testing commit 477f70cd2a67904e04c2c2b9bd0fa2e95222f2f6 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: dc5b117db94ea034cf3315296277549648815d051b6cedbd73efd6535d3b136a all runs: OK # git bisect good 477f70cd2a67904e04c2c2b9bd0fa2e95222f2f6 Bisecting: 3317 revisions left to test after this (roughly 12 steps) warning: unable to access '/syzkaller/.config/git/ignore': Permission denied warning: unable to access '/syzkaller/.config/git/attributes': Permission denied [626bf91a292e2035af5b9d9cce35c5c138dfe06d] Merge tag 'net-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net testing commit 626bf91a292e2035af5b9d9cce35c5c138dfe06d compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 31be5eb3c415b837bfb871f339074828392cc56133a8a885b35ab4bd036f719e all runs: OK # git bisect good 626bf91a292e2035af5b9d9cce35c5c138dfe06d Bisecting: 1650 revisions left to test after this (roughly 11 steps) warning: unable to access '/syzkaller/.config/git/ignore': Permission denied warning: unable to access '/syzkaller/.config/git/attributes': Permission denied [a3b397b4fffb799d25658defafd962f0fb3e9fe0] Merge branch 'akpm' (patches from Andrew) testing commit a3b397b4fffb799d25658defafd962f0fb3e9fe0 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: d8bb00161b342189318a07a4f0840815b65460a1366787ddb3a2a88a63618b45 all runs: OK # git bisect good a3b397b4fffb799d25658defafd962f0fb3e9fe0 Bisecting: 850 revisions left to test after this (roughly 10 steps) warning: unable to access '/syzkaller/.config/git/ignore': Permission denied warning: unable to access '/syzkaller/.config/git/attributes': Permission denied [3ff6d64e68abc231955d216236615918797614ae] libperf tests: Fix test_stat_cpu testing commit 3ff6d64e68abc231955d216236615918797614ae compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: c18fd3d01ab4393bc8fcc4af5260c8168e2cada9ad75e9a24a7948db8e2afeea all runs: OK # git bisect good 3ff6d64e68abc231955d216236615918797614ae Bisecting: 424 revisions left to test after this (roughly 9 steps) warning: unable to access '/syzkaller/.config/git/ignore': Permission denied warning: unable to access '/syzkaller/.config/git/attributes': Permission denied [515dcc2e02178ea8af2ea53b4ae5bdb6875b53ef] Merge tag 'dma-mapping-5.15-2' of git://git.infradead.org/users/hch/dma-mapping testing commit 515dcc2e02178ea8af2ea53b4ae5bdb6875b53ef compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: d802817de3e54e65c6b5c8a61289c305fc18564838ec5dae6b61e0eb8ecd3edd all runs: OK # git bisect good 515dcc2e02178ea8af2ea53b4ae5bdb6875b53ef Bisecting: 213 revisions left to test after this (roughly 8 steps) warning: unable to access '/syzkaller/.config/git/ignore': Permission denied warning: unable to access '/syzkaller/.config/git/attributes': Permission denied [79516af3497a5b89acb09f4a644f61d6c69e5f16] Merge tag 'drm-misc-fixes-2021-10-28' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes testing commit 79516af3497a5b89acb09f4a644f61d6c69e5f16 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 44e801a74b2e06ccc6e37f52ed073784a0cd6887a5a958bdef32ffcf7ec88f66 all runs: OK # git bisect good 79516af3497a5b89acb09f4a644f61d6c69e5f16 Bisecting: 84 revisions left to test after this (roughly 7 steps) warning: unable to access '/syzkaller/.config/git/ignore': Permission denied warning: unable to access '/syzkaller/.config/git/attributes': Permission denied [411a44c24a561e449b592ff631b7ae321f1eb559] Merge tag 'net-5.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net testing commit 411a44c24a561e449b592ff631b7ae321f1eb559 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: fd53b62f81a08cbf39bdf422ca3f3e8cfa8c3beb2fb90b912f10f0ae7b7207e7 all runs: OK # git bisect good 411a44c24a561e449b592ff631b7ae321f1eb559 Bisecting: 42 revisions left to test after this (roughly 5 steps) warning: unable to access '/syzkaller/.config/git/ignore': Permission denied warning: unable to access '/syzkaller/.config/git/attributes': Permission denied [17d50f89410c5f71142657d9a012cbabcaadb134] Merge tag 'mmc-v5.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc testing commit 17d50f89410c5f71142657d9a012cbabcaadb134 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 3f99e245e3135ff348a2d06514e109c1ca4cd8ee3f77bcea9e87b64e9f0fa5d7 all runs: OK # git bisect good 17d50f89410c5f71142657d9a012cbabcaadb134 Bisecting: 20 revisions left to test after this (roughly 5 steps) warning: unable to access '/syzkaller/.config/git/ignore': Permission denied warning: unable to access '/syzkaller/.config/git/attributes': Permission denied [bf85ba018f9229ce54765a62dba2dea60f7cdafb] Merge tag 'riscv-for-linus-5.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux testing commit bf85ba018f9229ce54765a62dba2dea60f7cdafb compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 5244edad018693809bc4875cb8fed4c54b1102a3024066564f7e5731935ea6a5 all runs: OK # git bisect good bf85ba018f9229ce54765a62dba2dea60f7cdafb Bisecting: 10 revisions left to test after this (roughly 3 steps) warning: unable to access '/syzkaller/.config/git/ignore': Permission denied warning: unable to access '/syzkaller/.config/git/attributes': Permission denied [89ac61ff05a5c79545aa93f7b1da7e4dbc60fc9a] perf callchain: Fix compilation on powerpc with gcc11+ testing commit 89ac61ff05a5c79545aa93f7b1da7e4dbc60fc9a compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: ab15d8cbfbc4b58469ca27b180803c65a5c0312db44ccb7ad947073de36fa7e3 all runs: OK # git bisect good 89ac61ff05a5c79545aa93f7b1da7e4dbc60fc9a Bisecting: 5 revisions left to test after this (roughly 3 steps) warning: unable to access '/syzkaller/.config/git/ignore': Permission denied warning: unable to access '/syzkaller/.config/git/attributes': Permission denied [0985dba842eaa391858972cfe2724c3c174a2827] KVM: x86/xen: Fix kvm_xen_has_interrupt() sleeping in kvm_vcpu_block() testing commit 0985dba842eaa391858972cfe2724c3c174a2827 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 3e79b37668ba972556849e423009091f80b8d80e2e2b805f9fdbe3d906230546 run #0: OK run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK run #10: OK run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: crashed: WARNING in ieee80211_vif_release_channel # git bisect bad 0985dba842eaa391858972cfe2724c3c174a2827 Bisecting: 2 revisions left to test after this (roughly 1 step) warning: unable to access '/syzkaller/.config/git/ignore': Permission denied warning: unable to access '/syzkaller/.config/git/attributes': Permission denied [0e9ff65f455dfd0a8aea5e7843678ab6fe097e21] KVM: s390: preserve deliverable_mask in __airqs_kick_single_vcpu testing commit 0e9ff65f455dfd0a8aea5e7843678ab6fe097e21 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 42292d20f4a9cc032f7715c0711bf6877d6e412face7610e7100fc617551e8da all runs: OK # git bisect good 0e9ff65f455dfd0a8aea5e7843678ab6fe097e21 Bisecting: 0 revisions left to test after this (roughly 1 step) warning: unable to access '/syzkaller/.config/git/ignore': Permission denied warning: unable to access '/syzkaller/.config/git/attributes': Permission denied [4b2caef043dd89dd98da282cd6b90af2cbb60650] Merge tag 'kvm-s390-master-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD testing commit 4b2caef043dd89dd98da282cd6b90af2cbb60650 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 5519997b70fe27cd2941c295ce44bc924c203d0689c801ecc14dc38d2abb7fbd all runs: OK # git bisect good 4b2caef043dd89dd98da282cd6b90af2cbb60650 warning: unable to access '/syzkaller/.config/git/attributes': Permission denied 0985dba842eaa391858972cfe2724c3c174a2827 is the first bad commit commit 0985dba842eaa391858972cfe2724c3c174a2827 Author: David Woodhouse Date: Sat Oct 23 20:47:19 2021 +0100 KVM: x86/xen: Fix kvm_xen_has_interrupt() sleeping in kvm_vcpu_block() In kvm_vcpu_block, the current task is set to TASK_INTERRUPTIBLE before making a final check whether the vCPU should be woken from HLT by any incoming interrupt. This is a problem for the get_user() in __kvm_xen_has_interrupt(), which really shouldn't be sleeping when the task state has already been set. I think it's actually harmless as it would just manifest itself as a spurious wakeup, but it's causing a debug warning: [ 230.963649] do not call blocking ops when !TASK_RUNNING; state=1 set at [<00000000b6bcdbc9>] prepare_to_swait_exclusive+0x30/0x80 Fix the warning by turning it into an *explicit* spurious wakeup. When invoked with !task_is_running(current) (and we might as well add in_atomic() there while we're at it), just return 1 to indicate that an IRQ is pending, which will cause a wakeup and then something will call it again in a context that *can* sleep so it can fault the page back in. Cc: stable@vger.kernel.org Fixes: 40da8ccd724f ("KVM: x86/xen: Add event channel interrupt vector upcall") Signed-off-by: David Woodhouse Message-Id: <168bf8c689561da904e48e2ff5ae4713eaef9e2d.camel@infradead.org> Signed-off-by: Paolo Bonzini arch/x86/kvm/xen.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) culprit signature: 3e79b37668ba972556849e423009091f80b8d80e2e2b805f9fdbe3d906230546 parent signature: 5519997b70fe27cd2941c295ce44bc924c203d0689c801ecc14dc38d2abb7fbd Reproducer flagged being flaky revisions tested: 16, total time: 3h31m34.619228268s (build: 2h37m42.401057324s, test: 52m11.166135818s) first bad commit: 0985dba842eaa391858972cfe2724c3c174a2827 KVM: x86/xen: Fix kvm_xen_has_interrupt() sleeping in kvm_vcpu_block() recipients (to): ["dwmw@amazon.co.uk" "linux-kernel@vger.kernel.org" "pbonzini@redhat.com"] recipients (cc): ["bp@alien8.de" "hpa@zytor.com" "jmattson@google.com" "joro@8bytes.org" "kvm@vger.kernel.org" "mingo@redhat.com" "pbonzini@redhat.com" "seanjc@google.com" "tglx@linutronix.de" "vkuznets@redhat.com" "wanpengli@tencent.com" "x86@kernel.org"] crash: WARNING in ieee80211_vif_release_channel RBP: 0000000000000004 R08: 0000000000000002 R09: 00007ffef3f9a190 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffef3f9a180 R13: 000000000000000e R14: 00000000ffffffff R15: 0000000000000000 ------------[ cut here ]------------ WARNING: CPU: 1 PID: 3937 at net/mac80211/chan.c:1862 ieee80211_vif_release_channel+0x149/0x1b0 net/mac80211/chan.c:1862 Modules linked in: CPU: 1 PID: 3937 Comm: syz-executor947 Not tainted 5.15.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:ieee80211_vif_release_channel+0x149/0x1b0 net/mac80211/chan.c:1862 Code: 48 c1 ea 03 80 3c 02 00 75 70 48 8b 83 48 06 00 00 be ff ff ff ff 48 8d b8 28 1c 00 00 e8 3f a9 94 00 85 c0 0f 85 63 ff ff ff <0f> 0b e9 5c ff ff ff 0f 0b e9 16 ff ff ff 48 c7 c7 4c 28 7f 8c e8 RSP: 0018:ffffc90002b7f078 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff88801c3b0c80 RCX: 0000000000000001 RDX: 0000000000000000 RSI: ffffffff88cb4c60 RDI: ffffffff89206860 RBP: ffff88801c3b12c8 R08: 0000000000000000 R09: ffff88801c3b003f R10: ffffed1003876007 R11: 3030303030302052 R12: ffff88801c3b0038 R13: 00000000fffffff4 R14: ffffc90002b7f290 R15: ffff88801c3b0000 FS: 000055555672f300(0000) GS:ffff8880b9f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f59afb1dd68 CR3: 000000006da36000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ieee80211_start_ap+0x168e/0x2160 net/mac80211/cfg.c:1227 rdev_start_ap net/wireless/rdev-ops.h:158 [inline] nl80211_start_ap+0x16f1/0x2610 net/wireless/nl80211.c:5526 genl_family_rcv_msg_doit+0x1e4/0x2f0 net/netlink/genetlink.c:731 genl_family_rcv_msg net/netlink/genetlink.c:775 [inline] genl_rcv_msg+0x27a/0x4a0 net/netlink/genetlink.c:792 netlink_rcv_skb+0x118/0x370 net/netlink/af_netlink.c:2504 genl_rcv+0x1f/0x30 net/netlink/genetlink.c:803 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x42e/0x700 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x704/0xbf0 net/netlink/af_netlink.c:1929 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xab/0xe0 net/socket.c:724 ____sys_sendmsg+0x5bf/0x7a0 net/socket.c:2409 ___sys_sendmsg+0xd3/0x150 net/socket.c:2463 __sys_sendmsg+0xb2/0x140 net/socket.c:2492 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f0c975c8049 Code: 97 01 00 85 c0 b8 00 00 00 00 48 0f 44 c3 5b c3 90 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffef3f9a158 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f0c975c8049 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 0000000000000004 R08: 0000000000000002 R09: 00007ffef3f9a190 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffef3f9a180 R13: 000000000000000e R14: 00000000ffffffff R15: 0000000000000000