[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <v6jvhxxb2t7dh5ox6feqvc3xnlkgjwrdofkxodmg3t4rrtew2u@hxghrcqhk2n4>
Date: Fri, 19 Jul 2024 21:39:55 -0400
From: "Liam R. Howlett" <Liam.Howlett@...cle.com>
To: syzbot <syzbot+c0f0941337ade4c26ed1@...kaller.appspotmail.com>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, lorenzo.stoakes@...cle.com,
syzkaller-bugs@...glegroups.com, vbabka@...e.cz, peili.dev@...il.com
Subject: Re: [syzbot] [mm?] possible deadlock in mmap_read_lock
* syzbot <syzbot+c0f0941337ade4c26ed1@...kaller.appspotmail.com> [240719 16:01]:
> Hello,
>
> syzbot found the following issue on:
This bug doesn't exist anymore.
>
> HEAD commit: 3fe121b62282 Add linux-next specific files for 20240712
> git tree: linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=1769e695980000
> kernel config: https://syzkaller.appspot.com/x/.config?x=98dd8c4bab5cdce
> dashboard link: https://syzkaller.appspot.com/bug?extid=c0f0941337ade4c26ed1
> 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/8c6fbf69718d/disk-3fe121b6.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/39fc7e43dfc1/vmlinux-3fe121b6.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/0a78e70e4b4e/bzImage-3fe121b6.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+c0f0941337ade4c26ed1@...kaller.appspotmail.com
>
>
> ============================================
> WARNING: possible recursive locking detected
> 6.10.0-rc7-next-20240712-syzkaller #0 Not tainted
> --------------------------------------------
> mount/4518 is trying to acquire lock:
> ffff88801d2b1498 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock+0x1c/0x60 include/linux/mmap_lock.h:144
>
> but task is already holding lock:
> ffff88801d2b1498 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:144 [inline]
> ffff88801d2b1498 (&mm->mmap_lock){++++}-{3:3}, at: exit_mmap+0x159/0xc80 mm/mmap.c:3396
>
> other info that might help us debug this:
> Possible unsafe locking scenario:
>
> CPU0
> ----
> lock(&mm->mmap_lock);
> lock(&mm->mmap_lock);
>
> *** DEADLOCK ***
>
> May be due to missing lock nesting notation
>
> 1 lock held by mount/4518:
> #0: ffff88801d2b1498 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:144 [inline]
> #0: ffff88801d2b1498 (&mm->mmap_lock){++++}-{3:3}, at: exit_mmap+0x159/0xc80 mm/mmap.c:3396
>
> stack backtrace:
> CPU: 1 UID: 0 PID: 4518 Comm: mount Not tainted 6.10.0-rc7-next-20240712-syzkaller #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
> Call Trace:
> <TASK>
> __dump_stack lib/dump_stack.c:94 [inline]
> dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
> print_deadlock_bug+0x483/0x620 kernel/locking/lockdep.c:3034
> check_deadlock kernel/locking/lockdep.c:3086 [inline]
> validate_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3888
> __lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5199
> lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5822
> down_read+0xb1/0xa40 kernel/locking/rwsem.c:1526
> mmap_read_lock+0x1c/0x60 include/linux/mmap_lock.h:144
> unmap_single_vma+0x2a0/0x330 mm/memory.c:1832
> unmap_vmas+0x3cc/0x5f0 mm/memory.c:1904
> exit_mmap+0x264/0xc80 mm/mmap.c:3412
> __mmput+0x115/0x390 kernel/fork.c:1347
> exit_mm+0x220/0x310 kernel/exit.c:571
This is discussed here [1]. There is some case where unmap_single_vma()
was reached without the lock held in write mode and the flag seems to
have been misunderstood.
[1.] https://lore.kernel.org/all/20240710-bug12-v1-1-0e5440f9b8d3@gmail.com/
Thanks,
Liam
Powered by blists - more mailing lists