Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1298010pxa; Sat, 15 Aug 2020 14:54:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOTdNg/8ghRxMMJH2Ot9AE+NjQQmTpnQp5ER9n/M7hvwyQl2ZRhTvEMmG19HThgAZXI8Ez X-Received: by 2002:a17:906:4aca:: with SMTP id u10mr8401607ejt.320.1597528454962; Sat, 15 Aug 2020 14:54:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597528454; cv=none; d=google.com; s=arc-20160816; b=A7ZLDpRbKr/1gObeUq788fFKXLM3gNtPjTKoTVyN4TYS31vVkAjetMeJVBYBzHCwFY aXaCkZteMcIdA3jF6aJLyFMk8arHZS+4V1xuXqvOCcnuv5MPfzFbvMc+wRrbKB3Nl74E tJfSo+RFPhQCkRgU3oqL+c1Lx/OIQc87GPSTG/e8kK+YCTYFrY8iVNfSp7XvRH+J+FM2 poc2uOl1y5jdltFc4RR5kWQ5/g1xf8gOtBkpoVo6hjIuhtX6Oes3L8s4BjGhWCTbOlUU kPYHlKcNyiA6UWg2gWcc9X81QXNynw1RUvtcmXpIv3uIPZCXEfoMUzhT1NiZj/FOKgtd DTYQ== 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=unqY6YUA6dN15yzdjEHwLUsw603J7sn/Dlnt+ztMhZk=; b=Odxv9Gcgj0iMFsAFcVc7cXvINIEXSHVT4EIbbObDepEEuieVUj6waBPlYoNBjsyj6E yTxXPlsn6ye3Sx+glhdMF4/cWuRJ2G3B5MnSVhV/uHoHPiG2KhdT5uTu43RhgdDy0k6T nYG2GxeWcaS86Xez1klCTRxQOzpHq06GMEYXqwEKdSYsWSh+npbeF6+jnSE183m1+3GK C7ogrr7lRjugIaOlZOZ7o+H7jYN489fwVbwv0MTRlwH/44mgmBH096eUADYQTOpvuMYN /76EIEPfBxupbj3jVWI2PtKkDnQ25numAFeq38fHDqnJOc9L0E6Vjcxt8UNKXOkoi6Kw wudQ== 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 z20si7983595edq.490.2020.08.15.14.53.52; Sat, 15 Aug 2020 14:54:14 -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 S1729176AbgHOVwq (ORCPT + 99 others); Sat, 15 Aug 2020 17:52:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729109AbgHOVwe (ORCPT ); Sat, 15 Aug 2020 17:52:34 -0400 Received: from mail-il1-x147.google.com (mail-il1-x147.google.com [IPv6:2607:f8b0:4864:20::147]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 580DEC0F26EB for ; Sat, 15 Aug 2020 11:09:20 -0700 (PDT) Received: by mail-il1-x147.google.com with SMTP id e12so8853831ile.14 for ; Sat, 15 Aug 2020 11:09:20 -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=unqY6YUA6dN15yzdjEHwLUsw603J7sn/Dlnt+ztMhZk=; b=QxBxNxQ3RZGbWkGX6PFQVliJC4Gs/78cJ0bptxm/KqjAgRQGrcslww9vrozK7RAyLV n5LkJ8zjPjfRDzq1LaDPPA8aM0qr3UbUc7ZqNBNF3JipyVdbvbMP0NWDhaQAapKW2bHW HETMsiqJG4pap+Osm0k2oHDAB2pBQO089JBa/2R7Pm1ZSzwlLxjagGoZL+Y0N/4Gi+2T hEaX5s9snTkkPuo2ICdhaDY0R9sa0S0Of9q9g+iwvaZ9p8GEwvQgQZaJ/VU8hdKbhuhf KmZWvwihMr2+NRE0MXkqumUQwamtR1aMqmJb7nVXEZISw4lAW1A2wwkjt7OydopXUuTH tKNQ== X-Gm-Message-State: AOAM531tgAedyUJHK4yKaVyUjFymKBuaxYYsT2hJRqMj33/Cv5QirlxW FfK10f9FFJEV1xh//2tnJrZ8pQDbKnj9HAra5kDBmzp0WYmv MIME-Version: 1.0 X-Received: by 2002:a92:bf0c:: with SMTP id z12mr7149150ilh.151.1597514957600; Sat, 15 Aug 2020 11:09:17 -0700 (PDT) Date: Sat, 15 Aug 2020 11:09:17 -0700 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000923cee05acee6f61@google.com> Subject: possible deadlock in io_poll_double_wake 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: c9c9735c Merge tag 'scsi-misc' of git://git.kernel.org/pub.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=127399f6900000 kernel config: https://syzkaller.appspot.com/x/.config?x=adea84f38e7bc8d dashboard link: https://syzkaller.appspot.com/bug?extid=0d56cfeec64f045baffc compiler: clang version 10.0.0 (https://github.com/llvm/llvm-project/ c2443155a0fb245c8f17f2c1c72b6ea391e86e81) 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+0d56cfeec64f045baffc@syzkaller.appspotmail.com ============================================ WARNING: possible recursive locking detected 5.8.0-syzkaller #0 Not tainted -------------------------------------------- syz-executor.1/9155 is trying to acquire lock: ffff8880a1fcc530 (&tty->write_wait){-.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] ffff8880a1fcc530 (&tty->write_wait){-.-.}-{2:2}, at: io_poll_double_wake+0x108/0x360 fs/io_uring.c:4599 but task is already holding lock: ffff8880a1fcc530 (&tty->write_wait){-.-.}-{2:2}, at: __wake_up_common_lock kernel/sched/wait.c:122 [inline] ffff8880a1fcc530 (&tty->write_wait){-.-.}-{2:2}, at: __wake_up+0xb8/0x150 kernel/sched/wait.c:142 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&tty->write_wait); lock(&tty->write_wait); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by syz-executor.1/9155: #0: ffff8880a1fcc098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:267 #1: ffff8880a1fcc2e8 (&tty->termios_rwsem){++++}-{3:3}, at: tty_set_termios+0xc5/0x1510 drivers/tty/tty_ioctl.c:328 #2: ffff8880a1fcc098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x18/0x80 drivers/tty/tty_ldisc.c:288 #3: ffff8880a1fcc530 (&tty->write_wait){-.-.}-{2:2}, at: __wake_up_common_lock kernel/sched/wait.c:122 [inline] #3: ffff8880a1fcc530 (&tty->write_wait){-.-.}-{2:2}, at: __wake_up+0xb8/0x150 kernel/sched/wait.c:142 stack backtrace: CPU: 0 PID: 9155 Comm: syz-executor.1 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+0x1f0/0x31e lib/dump_stack.c:118 print_deadlock_bug kernel/locking/lockdep.c:2391 [inline] check_deadlock kernel/locking/lockdep.c:2432 [inline] validate_chain+0x69a4/0x88a0 kernel/locking/lockdep.c:3202 __lock_acquire+0x1161/0x2ab0 kernel/locking/lockdep.c:4426 lock_acquire+0x160/0x730 kernel/locking/lockdep.c:5005 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] io_poll_double_wake+0x108/0x360 fs/io_uring.c:4599 __wake_up_common+0x30a/0x4e0 kernel/sched/wait.c:93 __wake_up_common_lock kernel/sched/wait.c:123 [inline] __wake_up+0xd4/0x150 kernel/sched/wait.c:142 n_tty_set_termios+0xa60/0x1080 drivers/tty/n_tty.c:1874 tty_set_termios+0xcac/0x1510 drivers/tty/tty_ioctl.c:341 set_termios+0x4a1/0x580 drivers/tty/tty_ioctl.c:414 tty_mode_ioctl+0x7b2/0xa80 drivers/tty/tty_ioctl.c:770 tty_ioctl+0xf81/0x15c0 drivers/tty/tty_io.c:2665 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:739 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45d239 Code: 5d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 2b b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f063db5fc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000017cc0 RCX: 000000000045d239 RDX: 0000000020000000 RSI: 0000000000005404 RDI: 0000000000000003 RBP: 000000000118cf80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cf4c R13: 00007ffc7ff6341f R14: 00007f063db609c0 R15: 000000000118cf4c --- 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.