Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1785605pxv; Sat, 10 Jul 2021 15:15:03 -0700 (PDT) X-Received: by 2002:a05:6e02:1a67:: with SMTP id w7mr8193644ilv.175.1625955302123; Sat, 10 Jul 2021 15:15:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1POC0vrT+0o0D9Kxg5EA0FUW1/Qf81pMxXdOz1jp3hYBBI9jh64h3Eksvg+eSdkCEpt9R X-Received: by 2002:a05:6e02:1a67:: with SMTP id w7mr8193506ilv.175.1625955300097; Sat, 10 Jul 2021 15:15:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625955300; cv=none; d=google.com; s=arc-20160816; b=aAliZL45NzKp/R5XIXQt/nG9JNeP/H+GZGM0+GhLq7iQjPm5Z+XDqSMIORMQlav54X AVR6MQhu+RsCtMIIpQWx+x5iGigrhVzEQtw9Oh4jhFZa+LdObkmsltTV2CNBRhs4dHa/ uiKNEzKxgc3bS024+VuqHGZFrKreUpH9mH6pOkoHWBc4a3QS34BcmZtWrDoictbtY72s oV2TUo6vBCB/7esQ8miC1G/AEjHwaT1c8ittLruYKOgTs3Dot93pdh0a6K1qDnI/XsF4 SJnWF3u6yxs1P7lV/AdL9KFZuag+f5m4D3+gJ73z052Gj4/3yBgOwe5ELTgWBI3d16oF 6Lpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:message-id:date:mime-version; bh=3QXNL+D6XbPTQrGHBqEe6kefPssk/lteAEUhSQF2D0o=; b=0ituA5EpMDsANvkk4vCeuadn3gCzjwJ1eiTyTayAVT2BbJ4GhyS2NsZJw693qPY8w9 f1v3T5YyxoO/hLeURfCIO84C53VKp6s4r125QBcyHw6ZZpoCw2lUIsys7lOuHBjJZc4w 9BispPgkKfBWAfuxInjz9eJWL121sI0/e8L5nB7SuKH5SND2d9wndaO1vCeP92hYQgrJ Zujn1EiEfC5WjodAKzKN3puHIIe0f0F/VUChH/dO7gWWY7UKLX7dtjNK21nTuOz4p+Cw /sj6QM0SJRg0rq8BHMRaOhj3ctAcoON7HODWSRGQPCWPBWp4zAuH8iNItYeKRdAq+Q8t zL6g== 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 p7si1122454iop.92.2021.07.10.15.14.48; Sat, 10 Jul 2021 15:15:00 -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 S229674AbhGJWPF (ORCPT + 99 others); Sat, 10 Jul 2021 18:15:05 -0400 Received: from mail-io1-f70.google.com ([209.85.166.70]:40485 "EHLO mail-io1-f70.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbhGJWPE (ORCPT ); Sat, 10 Jul 2021 18:15:04 -0400 Received: by mail-io1-f70.google.com with SMTP id l15-20020a5e820f0000b02904bd1794d00eso9018535iom.7 for ; Sat, 10 Jul 2021 15:12: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=3QXNL+D6XbPTQrGHBqEe6kefPssk/lteAEUhSQF2D0o=; b=g4JLIKiKncVpdjnbQONvAKE/4TJDNC5V4AAg/oVHRL/9zk/VdKA4BksbAIiaS0rvcV Ahk9J49dBbFge8mvIwYoNSKxpcy2BvO9cpygJaXMVMihXJRN8sHlAImZFE6xIh+QS2Sz tknSdO0OKtoFZ0kgSKPQr+sReJsvZQObBoOEuTHLf2UX5CVM2llMfd4b1e4HQPWf9VBe UF18E6yf8xswSVpx/gNXlzZrHv10wQEaKrFtte9QpWlQu9Dqf1gEKb2oHwnnfRNC3ddh J8+MyC3gqT3HJxLwIrvSW+aO8bgGhTaIlXBh3rDKH25YrdotvbNAs1V3iqFkdtxTknYB DG5w== X-Gm-Message-State: AOAM533N4cdK1umZMUFKklrmXovXOhlqAcOW9hyFuVdZ1AEM1x/dqKOw Ys68aIrRx9vA4nu3d/wgad2x1vXHfw3WeJo+13GuG6kWOGOI MIME-Version: 1.0 X-Received: by 2002:a05:6e02:dd2:: with SMTP id l18mr30784225ilj.34.1625955137869; Sat, 10 Jul 2021 15:12:17 -0700 (PDT) Date: Sat, 10 Jul 2021 15:12:17 -0700 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <00000000000069f57705c6cc2e81@google.com> Subject: [syzbot] BUG: sleeping function called from invalid context in __munlock_pagevec 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, syzbot found the following issue on: HEAD commit: ee268dee Add linux-next specific files for 20210707 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=13ed30d2300000 kernel config: https://syzkaller.appspot.com/x/.config?x=59e1e3bbc3afca75 dashboard link: https://syzkaller.appspot.com/bug?extid=cf9c548279bff83b0c97 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17a25ee4300000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14f81928300000 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+cf9c548279bff83b0c97@syzkaller.appspotmail.com BUG: sleeping function called from invalid context at include/linux/pagemap.h:674 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 8467, name: syz-executor631 1 lock held by syz-executor631/8467: #0: ffff8880343e0978 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:359 [inline] #0: ffff8880343e0978 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: map_pte mm/page_vma_mapped.c:52 [inline] #0: ffff8880343e0978 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: page_vma_mapped_walk+0xd87/0x24f0 mm/page_vma_mapped.c:261 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 0 PID: 8467 Comm: syz-executor631 Not tainted 5.13.0-next-20210707-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:105 ___might_sleep.cold+0x1f1/0x237 kernel/sched/core.c:9171 lock_page include/linux/pagemap.h:674 [inline] __munlock_pagevec+0xa22/0x2340 mm/mlock.c:314 munlock_vma_pages_range+0x9d7/0xf00 mm/mlock.c:475 munlock_vma_pages_all mm/internal.h:354 [inline] unlock_range mm/mmap.c:2811 [inline] exit_mmap+0x47a/0x620 mm/mmap.c:3188 __mmput+0x122/0x470 kernel/fork.c:1152 mmput+0x58/0x60 kernel/fork.c:1173 exit_mm kernel/exit.c:501 [inline] do_exit+0xae2/0x2a60 kernel/exit.c:812 do_group_exit+0x125/0x310 kernel/exit.c:922 __do_sys_exit_group kernel/exit.c:933 [inline] __se_sys_exit_group kernel/exit.c:931 [inline] __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:931 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:0x43e969 Code: Unable to access opcode bytes at RIP 0x43e93f. RSP: 002b:00007ffce2d3a7a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 00000000004b02f0 RCX: 000000000043e969 RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffffffffffffffc0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004b02f0 R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001 ============================= [ BUG: Invalid wait context ] 5.13.0-next-20210707-syzkaller #0 Tainted: G W ----------------------------- syz-executor631/8467 is trying to lock: ffff888035ea6000 (&mapping->i_mmap_rwsem){++++}-{3:3}, at: i_mmap_lock_read include/linux/fs.h:514 [inline] ffff888035ea6000 (&mapping->i_mmap_rwsem){++++}-{3:3}, at: rmap_walk_file+0x52f/0x710 mm/rmap.c:2337 other info that might help us debug this: context-{4:4} 1 lock held by syz-executor631/8467: #0: ffff8880343e0978 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:359 [inline] #0: ffff8880343e0978 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: map_pte mm/page_vma_mapped.c:52 [inline] #0: ffff8880343e0978 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: page_vma_mapped_walk+0xd87/0x24f0 mm/page_vma_mapped.c:261 stack backtrace: CPU: 0 PID: 8467 Comm: syz-executor631 Tainted: G W 5.13.0-next-20210707-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:105 print_lock_invalid_wait_context kernel/locking/lockdep.c:4666 [inline] check_wait_context kernel/locking/lockdep.c:4727 [inline] __lock_acquire.cold+0x213/0x3ab kernel/locking/lockdep.c:4965 lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 down_read+0x9a/0x440 kernel/locking/rwsem.c:1353 i_mmap_lock_read include/linux/fs.h:514 [inline] rmap_walk_file+0x52f/0x710 mm/rmap.c:2337 rmap_walk+0x10d/0x190 mm/rmap.c:2366 page_mlock+0x448/0x650 mm/rmap.c:2029 __munlock_isolated_page+0x88/0x410 mm/mlock.c:122 __munlock_pagevec+0xd7f/0x2340 mm/mlock.c:322 munlock_vma_pages_range+0x9d7/0xf00 mm/mlock.c:475 munlock_vma_pages_all mm/internal.h:354 [inline] unlock_range mm/mmap.c:2811 [inline] exit_mmap+0x47a/0x620 mm/mmap.c:3188 __mmput+0x122/0x470 kernel/fork.c:1152 mmput+0x58/0x60 kernel/fork.c:1173 exit_mm kernel/exit.c:501 [inline] do_exit+0xae2/0x2a60 kernel/exit.c:812 do_group_exit+0x125/0x310 kernel/exit.c:922 __do_sys_exit_group kernel/exit.c:933 [inline] __se_sys_exit_group kernel/exit.c:931 [inline] __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:931 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:0x43e969 Code: Unable to access opcode bytes at RIP 0x43e93f. RSP: 002b:00007ffce2d3a7a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 00000000004b02f0 RCX: 000000000043e969 RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffffffffffffffc0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004b02f0 R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001 --- 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