Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp4418809pxa; Mon, 10 Aug 2020 08:38:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzf9Q0E70nyDfNGe4RdEHQYvhqULSbf4N3xI6kr9qykrjMxwGcWJV3MkwNx1ZUqtA+XBMCm X-Received: by 2002:a50:d655:: with SMTP id c21mr21093705edj.49.1597073903169; Mon, 10 Aug 2020 08:38:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597073903; cv=none; d=google.com; s=arc-20160816; b=JIPUp2uY7eimvjc6VtF+dlgLiQ6NqJq7xNhykImoe4LFHCEDVTCF3Qum+VRFSCxRa6 YaWIjJ8YKtkZElANMXiL9AGDKQ0PfNFvW8R2T5yzOuGNYBc8ormm87Ihc19uldS80jlm S4NH33wA0/hwojrmwCh/OZWgLvR4p9TIwgYqQftw6yf53wrLpaAL44NsvnCrH0imbgF9 G2qIOe68P/zcZ4ZsSNHwRZdZREPcfXDBavArQt1OBkgco2abphYOmo6/vUpUBqRdwEaf /AhSuQhLx0A4uj4+Qk51yRqR3m6wnFSnGMKXZEaW3UVt55wouMCw7pDehsLi7YQHeIW0 +bHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:from:subject:message-id:date :mime-version; bh=vgKXH4WJ5mL8jBHkC4QRYXqac1PdnedowUxx7rlEsuM=; b=AjesgdUOpLrc4oxqi0FmLrN3OBtaR7GihpjkxN1emwVaRxBS+EE+reilKFrLdhxbNn YFGPOnoMiaqmcoNVSIBSgSt2a2yOIpi/Q9pSuHYME57n8ZGcu7AltdFBD+Di88mZOf1z YAlj2KjN0VtJYm2zJ3EH8qw2uUl884jrKxRu82Xxv8RYfk9YXcR2wO3wra7IyyPB2ulF 5X4ANTpUjEaS/dLEnqqqv9RhGyUfM03o1jyD4uy+bIwj+lrm2pZLIDViYK3FO8VbX09W 0XmmciCyvJ451VptNK6SjjXDPTg+tRMvAZfrvhUwdDC9XksjoXiFx2uO/CbJzvkfkHk6 NbPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f9si13361827ejl.286.2020.08.10.08.37.59; Mon, 10 Aug 2020 08:38:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728818AbgHJPhY (ORCPT + 99 others); Mon, 10 Aug 2020 11:37:24 -0400 Received: from mail-il1-f200.google.com ([209.85.166.200]:39759 "EHLO mail-il1-f200.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728674AbgHJPhT (ORCPT ); Mon, 10 Aug 2020 11:37:19 -0400 Received: by mail-il1-f200.google.com with SMTP id i66so8131957ile.6 for ; Mon, 10 Aug 2020 08:37:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=vgKXH4WJ5mL8jBHkC4QRYXqac1PdnedowUxx7rlEsuM=; b=BdTAcyAO2sMSO9NX6lGEO9+xq6O1OXo2QvIEhs24TX6tCBiH2MtWRZfYrs3oVVBCtu XFiHXaj6yqIUTnUpstXq7z3JfCsZsW48US/VDIsU0dRiTjFJd8UYGhfbapqM8OEC/V52 OG3o4LFFpvQDFbciz50LUSZVxHeGk4pvHLAIt9/zu7E7kV4hX0W0zNZySstFB9/Z4p/Y Jhpxcgaax3wtkTpkvmzbhLj5DZ/co75uDEbtFqgUxQHuWz9Mk3J05EVGqQpf5h78dLPV fvxQDWofXWaKF78ellsHuYqKaz7LHrQ1DRNLDjXz8EjYjMOxjTzN5oziCujDQ7jfpdWB sXcQ== X-Gm-Message-State: AOAM5306lRyBT581RjR36PT/WTCURT7S6IfPCAUMrTtYKSXqyyD8+im0 c9CI94e2Fv+Urb2ISi7uT2KMfvF65mOMLf3ROoob9JZih2Is MIME-Version: 1.0 X-Received: by 2002:a92:c7ae:: with SMTP id f14mr19137037ilk.39.1597073838340; Mon, 10 Aug 2020 08:37:18 -0700 (PDT) Date: Mon, 10 Aug 2020 08:37:18 -0700 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000d07f9605ac87ba9e@google.com> Subject: possible deadlock in io_queue_linked_timeout From: syzbot To: axboe@kernel.dk, io-uring@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, viro@zeniv.linux.org.uk Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, syzbot found the following issue on: HEAD commit: 06a81c1c Merge tag 'arm64-fixes' of git://git.kernel.org/p.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=13fbac1c900000 kernel config: https://syzkaller.appspot.com/x/.config?x=bf68a13f867fd1b4 dashboard link: https://syzkaller.appspot.com/bug?extid=d4586d3028284ff8a0be compiler: gcc (GCC) 10.1.0-syz 20200507 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1362024e900000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1672fd34900000 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+d4586d3028284ff8a0be@syzkaller.appspotmail.com ============================================ WARNING: possible recursive locking detected 5.8.0-syzkaller #0 Not tainted -------------------------------------------- syz-executor880/6847 is trying to acquire lock: ffff8880a19214d8 (&ctx->completion_lock){....}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:379 [inline] ffff8880a19214d8 (&ctx->completion_lock){....}-{2:2}, at: io_queue_linked_timeout+0x4c/0x200 fs/io_uring.c:5928 but task is already holding lock: ffff8880a19214d8 (&ctx->completion_lock){....}-{2:2}, at: io_cqring_overflow_flush+0x814/0xaa0 fs/io_uring.c:1333 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&ctx->completion_lock); lock(&ctx->completion_lock); *** DEADLOCK *** May be due to missing lock nesting notation 1 lock held by syz-executor880/6847: #0: ffff8880a19214d8 (&ctx->completion_lock){....}-{2:2}, at: io_cqring_overflow_flush+0x814/0xaa0 fs/io_uring.c:1333 stack backtrace: CPU: 1 PID: 6847 Comm: syz-executor880 Not tainted 5.8.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x18f/0x20d lib/dump_stack.c:118 print_deadlock_bug kernel/locking/lockdep.c:2391 [inline] check_deadlock kernel/locking/lockdep.c:2432 [inline] validate_chain kernel/locking/lockdep.c:3202 [inline] __lock_acquire.cold+0x115/0x396 kernel/locking/lockdep.c:4426 lock_acquire+0x1f1/0xad0 kernel/locking/lockdep.c:5005 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:128 [inline] _raw_spin_lock_irq+0x5b/0x80 kernel/locking/spinlock.c:167 spin_lock_irq include/linux/spinlock.h:379 [inline] io_queue_linked_timeout+0x4c/0x200 fs/io_uring.c:5928 __io_queue_async_work+0x1f8/0x4c0 fs/io_uring.c:1192 __io_queue_deferred fs/io_uring.c:1237 [inline] io_commit_cqring+0x456/0x7a0 fs/io_uring.c:1265 io_cqring_overflow_flush+0x5b8/0xaa0 fs/io_uring.c:1359 io_ring_ctx_wait_and_kill+0x30e/0x600 fs/io_uring.c:7808 io_uring_release+0x3e/0x50 fs/io_uring.c:7829 __fput+0x285/0x920 fs/file_table.c:281 task_work_run+0xdd/0x190 kernel/task_work.c:135 exit_task_work include/linux/task_work.h:25 [inline] do_exit+0xb7d/0x29f0 kernel/exit.c:806 do_group_exit+0x125/0x310 kernel/exit.c:903 __do_sys_exit_group kernel/exit.c:914 [inline] __se_sys_exit_group kernel/exit.c:912 [inline] __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:912 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x43f598 Code: Bad RIP value. RSP: 002b:00007ffd3a4fbaa8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043f598 RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 RBP: 00000000004beda8 R08: 00000000000000e7 R09: ffffffffffffffd0 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00000000006d11a0 R14: 0000000000000000 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 syzkaller@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