From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40025C4345F for ; Sun, 21 Apr 2024 03:14:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5B0F96B007B; Sat, 20 Apr 2024 23:14:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 560D06B0082; Sat, 20 Apr 2024 23:14:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4289D6B0083; Sat, 20 Apr 2024 23:14:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 1C2356B007B for ; Sat, 20 Apr 2024 23:14:22 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 132E8A0787 for ; Sun, 21 Apr 2024 03:14:21 +0000 (UTC) X-FDA: 82032070722.19.14945C9 Received: from mail-io1-f70.google.com (mail-io1-f70.google.com [209.85.166.70]) by imf08.hostedemail.com (Postfix) with ESMTP id 8384F16000A for ; Sun, 21 Apr 2024 03:14:19 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=appspotmail.com (policy=none); spf=pass (imf08.hostedemail.com: domain of 3ioQkZgkbAF0NTUF5GG9M5KKD8.BJJBG9PN9M7JIO9IO.7JH@M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com designates 209.85.166.70 as permitted sender) smtp.mailfrom=3ioQkZgkbAF0NTUF5GG9M5KKD8.BJJBG9PN9M7JIO9IO.7JH@M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1713669259; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references; bh=D0dIUOyf9BJ8NEnHNMqH1eOkFQZzFXRLnhyIEX26rYY=; b=w/ROiRJNNLx+xJ7egTnQurYLxL2EuFTz0pxKfzxqW+l9QqOmhfCln3pXwfp16B/B9P77/J gKw7mT74CR5duImOridq0QOlxSmc8vm4emSDUga9Xj3FspXLCmeJ6fEtxIsN4i1xazbb00 uDznM17x+xohOrQwQhjB/smQb9y8m1U= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713669259; a=rsa-sha256; cv=none; b=uDB0m83pHjVA6Dd4PSSo1af0rbpbKFkJ9hirzyhnFRD4hKiahb/yZIRwRoIde0xbNfOsHN AUcLw66JysoRsGXms6L3V0hIcMKuUQvtm246FpL6K1o6NmJqnyYwccy00pjvw0Ct/UF12Z GFuZXu6qn/Zj2r88aBFnN7Dh+C0LL4c= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=appspotmail.com (policy=none); spf=pass (imf08.hostedemail.com: domain of 3ioQkZgkbAF0NTUF5GG9M5KKD8.BJJBG9PN9M7JIO9IO.7JH@M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com designates 209.85.166.70 as permitted sender) smtp.mailfrom=3ioQkZgkbAF0NTUF5GG9M5KKD8.BJJBG9PN9M7JIO9IO.7JH@M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-io1-f70.google.com with SMTP id ca18e2360f4ac-7da52a99cbdso231885439f.1 for ; Sat, 20 Apr 2024 20:14:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713669258; x=1714274058; h=to:from:subject:message-id:date:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=D0dIUOyf9BJ8NEnHNMqH1eOkFQZzFXRLnhyIEX26rYY=; b=pTZ8DtSS/tUnCqLTHGThSd3KggbNnqzNQrOqYuKASACR49PnOdLU/uv3MqicU05fOX /qXRSI6tOmRb7KkmsWmDgcXTiVtwsGkJMBWubX5CE8Pftmkgqz/8f1wBZkqwzBL8XvGK gCS5sSahR+pkS3k/zam+wmP/eznnP5rKAjNxCGK6xSEekhgBksQAquuAA6a/otw55k3i PumIKlpIGRq6ZTNkOT1gplBCq5K4TxggMWW1CJB0Jfq/kD6Y/fv0wV6IW7fFfZd7q164 s+BVFlHkX/GOyO+Ce1LjUxK8MYWBAQfo3FyZUxGyanFkYT/xcS6XS60kCSmWnbKrkvzP Eeaw== X-Forwarded-Encrypted: i=1; AJvYcCXVHgfTXYuc4TY48Lpqxcvs1BVymKpjz4oPM4+Vj3r+VpO2E0jrnWF9Y223PLp0+3PLkWFd3rmmbqeXxY2430yMp8o= X-Gm-Message-State: AOJu0Yy+AbSd9g0hS0AIz2YdEEm2oSH5SXz2M8ivmhDT4ITF5kDyOlds t8IyO5UyNqxbex9EX+rcq3OPTdWd7HOlIp8rSJ4yFx5q5R4PzZLtaRqsPuiCLsSdHbtGKWqPCTJ HWdZGq2OhlSfNQvxrt6jI6uKXyfJBsm3z1W8EFVJqqJdlS6Xa969yNgQ= X-Google-Smtp-Source: AGHT+IFaO8JHB8boo0dhjOL7kZZUE1L2ICumqaY0L5U4Ep3ddVao4LM3AQh0iH4+1cKXZ8QSujSJPcq4XvsBaAS6FleO7jR5LnQe MIME-Version: 1.0 X-Received: by 2002:a05:6638:1405:b0:484:dd72:a148 with SMTP id k5-20020a056638140500b00484dd72a148mr359399jad.1.1713669258591; Sat, 20 Apr 2024 20:14:18 -0700 (PDT) Date: Sat, 20 Apr 2024 20:14:18 -0700 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <0000000000006bca48061692b790@google.com> Subject: [syzbot] [mm?] possible deadlock in gup_fast_fallback From: syzbot To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" X-Stat-Signature: wpirbos5wgw3tjjqrut81zscegpeesoo X-Rspamd-Queue-Id: 8384F16000A X-Rspamd-Server: rspam06 X-Rspam-User: X-HE-Tag: 1713669259-676654 X-HE-Meta: U2FsdGVkX19s+f9+PpkQhIa+1/Gom9s84CoOvtiiVeQ4Po3pKmkPd6ERy8z0JL/c+prW2AgReSe3x3NFacaCh8QWgPXZ1pJC55KnU4nWrjJl4cqYXxiuazT0wp88R6rjsGyZ2ibPldzqprdo2311nRIz/0cz1MVVcOM1SALMUs85Pq1ZWcZKS6olKPPondGANkECBaHo1bgwaAf8HLq6r50qqSU6a7ObDeYyV1fwCjscyT9VR5aVerdHBRirPDk355uLHwQUA6Z0j8SJ2rifVzYaIukRQHmnys35ceQA5qJXlpvEuctGg8KZ1PuKzHkgbTNyvRwqlyRXaObPaB1Fb5JVAtodJpZ6AcglLsQezStvgKhTzPPvmR0r/dhnW/nsKZqLfNFnVo57uzFHJfm6ppt0CrdH6vr1icq7owlXuT+SGv+VkGtVfZytT8t20WXIhLEI+RXfVPydSBsYAsHg90Ug5SlAL5iLvUgl3Mr2V7JjJs45MkfLBZ2a1JElLbvYK+00Q4/QLMQM4g6o+Iw1nN1PD80ICfwftLbcErdfRigh9ZuGHUOHBzXtLmdc9ksQBNfFa8DMav+i2UjY3uSVH26r6YZwHO1R/LwuTeiftyiDWuErq6Dz65TQFYfZdeUCflMP3ge86sS7EbFD7ehIrivZTsF1gWw8Pi4YBIJeOkD3HUzAN21SbMOvOqLMiBK4lT5+UXsxnu+p4EwtHKhYJ8nkRTylsyXemSXZHW+5dzuTXVi5OHs+zCRgpsfF+dxtA0P3O6ScAOXptGmAGAxFLcdiIm4pSNXPmrhzGyyJoX5vCqiL30Ufy03j1hNErVA3xnAg1kuKO5hpeXAxLCg4SNegi3xntxjDIfQf4evqKA3jUvCOGaP3V8fOlCnxFv0BziPeooWXw2Yexxo6nle+zpnCDg6BL9oxb16cNMtxY1ul7WTUmnpFzt4A5I5jeuBZ6Oe4we0w4YnxF9uve7v yfpKWo72 IlMu8Mbm1KfGqIxB0tVSIS1q50dcVhIUttkOpJQthiauEdEXRQysiT/hB3DLKU9xrwV0mKzwnQdasM1X33zyJ9EatWmpwJ5XZUT/aSiA6GEI5GxpE/1TAoSU5nl2DuiKGpSqijSgHM8fotFYnoNOBhhaN8faHPoQxOYqLjU8rbCqstjUJN1hpuWh2D67H3uRTEU0S6NLJBCIEcw7LmEe41lAvpiRyyw0yMbvJvWiwaP38knUR73qkCIuYIFu9tarwhRuMvZtV90bgALsgA0KATDCl6VjU4bcWqJeAr4rF9UdbP5Fdifi70fdingu5TEUwMg79b8ZYFkTjJn8uxANvU/JsPekjMfe2uh174OleasMo6jlTdgEppm9lF/1+hPYLwmkMWZRR1kwjROwgp79mh1uGCPlGI6sL44TnAk+7dfOudIDwhnkt4DyyR/X+zsBvxdoNGQ6aPKJP9pF6WcJel1/tA3VSjV7r/RrtP8mNJro81MdoAqnqJ80GVnX69kwnePyBegEwlhyi6oKw1pCDF3n2x2Ekclqs6nawZBxLfGU+3DgGQpAfcw84KkE2Q90/8VthTPWlp7VjKxvDz/W1dUOGN8reFz5vVuCRpDl6esp6UA3of0w8oUKz1645jIIYDvPLbVrIkcYciJzHXkAhDJ29BgRD28tOKdK7fB3Hre8u2mc= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hello, syzbot found the following issue on: HEAD commit: 66e4190e92ce Add linux-next specific files for 20240416 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=1526f44f180000 kernel config: https://syzkaller.appspot.com/x/.config?x=c247afaa437e6409 dashboard link: https://syzkaller.appspot.com/bug?extid=63ba90b81c16b86379bd compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 Unfortunately, I don't have any reproducer for this issue yet. Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/86891dae5f9c/disk-66e4190e.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/1ca383660bf2/vmlinux-66e4190e.xz kernel image: https://storage.googleapis.com/syzbot-assets/bf6ff37d3fcc/bzImage-66e4190e.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+63ba90b81c16b86379bd@syzkaller.appspotmail.com ====================================================== WARNING: possible circular locking dependency detected 6.9.0-rc4-next-20240416-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.2/9254 is trying to acquire lock: ffff88802c2f0b18 (&mm->mmap_lock){++++}-{3:3}, at: gup_fast_fallback+0x233/0x2b40 mm/gup.c:3442 but task is already holding lock: ffff88806a3c3d80 (&sb->s_type->i_mutex_key#29){++++}-{3:3}, at: inode_lock include/linux/fs.h:791 [inline] ffff88806a3c3d80 (&sb->s_type->i_mutex_key#29){++++}-{3:3}, at: __blockdev_direct_IO+0x346/0x49b0 fs/direct-io.c:1146 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&sb->s_type->i_mutex_key#29){++++}-{3:3}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 down_write+0x3a/0x50 kernel/locking/rwsem.c:1579 inode_lock include/linux/fs.h:791 [inline] exfat_page_mkwrite+0x43a/0xea0 fs/exfat/file.c:629 do_page_mkwrite+0x19b/0x480 mm/memory.c:3097 do_shared_fault mm/memory.c:4977 [inline] do_fault mm/memory.c:5039 [inline] do_pte_missing mm/memory.c:3881 [inline] handle_pte_fault+0x1298/0x6dc0 mm/memory.c:5359 __handle_mm_fault mm/memory.c:5500 [inline] handle_mm_fault+0x10e7/0x1bb0 mm/memory.c:5665 do_user_addr_fault arch/x86/mm/fault.c:1420 [inline] handle_page_fault arch/x86/mm/fault.c:1512 [inline] exc_page_fault+0x2b9/0x900 arch/x86/mm/fault.c:1570 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 -> #1 (sb_pagefaults#3){.+.+}-{0:0}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1659 [inline] sb_start_pagefault include/linux/fs.h:1824 [inline] exfat_page_mkwrite+0x161/0xea0 fs/exfat/file.c:619 do_page_mkwrite+0x19b/0x480 mm/memory.c:3097 do_shared_fault mm/memory.c:4977 [inline] do_fault mm/memory.c:5039 [inline] do_pte_missing mm/memory.c:3881 [inline] handle_pte_fault+0x1298/0x6dc0 mm/memory.c:5359 __handle_mm_fault mm/memory.c:5500 [inline] handle_mm_fault+0x10e7/0x1bb0 mm/memory.c:5665 do_user_addr_fault arch/x86/mm/fault.c:1420 [inline] handle_page_fault arch/x86/mm/fault.c:1512 [inline] exc_page_fault+0x2b9/0x900 arch/x86/mm/fault.c:1570 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 -> #0 (&mm->mmap_lock){++++}-{3:3}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x18cb/0x58e0 kernel/locking/lockdep.c:3869 __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 gup_fast_fallback+0x24c/0x2b40 mm/gup.c:3442 pin_user_pages_fast+0xcc/0x160 mm/gup.c:3566 iov_iter_extract_user_pages lib/iov_iter.c:1583 [inline] iov_iter_extract_pages+0x3db/0x720 lib/iov_iter.c:1646 dio_refill_pages fs/direct-io.c:173 [inline] dio_get_page fs/direct-io.c:214 [inline] do_direct_IO fs/direct-io.c:916 [inline] __blockdev_direct_IO+0x150a/0x49b0 fs/direct-io.c:1249 blockdev_direct_IO include/linux/fs.h:3182 [inline] exfat_direct_IO+0x1b4/0x3d0 fs/exfat/inode.c:526 generic_file_read_iter+0x231/0x430 mm/filemap.c:2783 aio_read+0x364/0x500 fs/aio.c:1611 io_submit_one+0x884/0x18b0 fs/aio.c:2061 __do_sys_io_submit fs/aio.c:2120 [inline] __se_sys_io_submit+0x179/0x2f0 fs/aio.c:2090 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: &mm->mmap_lock --> sb_pagefaults#3 --> &sb->s_type->i_mutex_key#29 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sb->s_type->i_mutex_key#29); lock(sb_pagefaults#3); lock(&sb->s_type->i_mutex_key#29); rlock(&mm->mmap_lock); *** DEADLOCK *** 1 lock held by syz-executor.2/9254: #0: ffff88806a3c3d80 (&sb->s_type->i_mutex_key#29){++++}-{3:3}, at: inode_lock include/linux/fs.h:791 [inline] #0: ffff88806a3c3d80 (&sb->s_type->i_mutex_key#29){++++}-{3:3}, at: __blockdev_direct_IO+0x346/0x49b0 fs/direct-io.c:1146 stack backtrace: CPU: 0 PID: 9254 Comm: syz-executor.2 Not tainted 6.9.0-rc4-next-20240416-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x18cb/0x58e0 kernel/locking/lockdep.c:3869 __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 gup_fast_fallback+0x24c/0x2b40 mm/gup.c:3442 pin_user_pages_fast+0xcc/0x160 mm/gup.c:3566 iov_iter_extract_user_pages lib/iov_iter.c:1583 [inline] iov_iter_extract_pages+0x3db/0x720 lib/iov_iter.c:1646 dio_refill_pages fs/direct-io.c:173 [inline] dio_get_page fs/direct-io.c:214 [inline] do_direct_IO fs/direct-io.c:916 [inline] __blockdev_direct_IO+0x150a/0x49b0 fs/direct-io.c:1249 blockdev_direct_IO include/linux/fs.h:3182 [inline] exfat_direct_IO+0x1b4/0x3d0 fs/exfat/inode.c:526 generic_file_read_iter+0x231/0x430 mm/filemap.c:2783 aio_read+0x364/0x500 fs/aio.c:1611 io_submit_one+0x884/0x18b0 fs/aio.c:2061 __do_sys_io_submit fs/aio.c:2120 [inline] __se_sys_io_submit+0x179/0x2f0 fs/aio.c:2090 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f397947dea9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f397a1670c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000d1 RAX: ffffffffffffffda RBX: 00007f39795abf80 RCX: 00007f397947dea9 RDX: 0000000020000540 RSI: 0000000000003f0a RDI: 00007f397a13d000 RBP: 00007f39794ca4a4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f39795abf80 R15: 00007ffd43409678 --- 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. If the report is already addressed, let syzbot know by replying with: #syz fix: exact-commit-title If you want to overwrite report's subsystems, reply with: #syz set subsystems: new-subsystem (See the list of subsystem names on the web dashboard) If the report is a duplicate of another one, reply with: #syz dup: exact-subject-of-another-report If you want to undo deduplication, reply with: #syz undup