From: Liam Howlett <liam.howlett@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: syzbot <syzbot+a7b60a176ec13cafb793@syzkaller.appspotmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"syzkaller-bugs@googlegroups.com"
<syzkaller-bugs@googlegroups.com>,
"Ondrej Mosnacek" <omosnace@redhat.com>,
"Minchan Kim" <minchan@kernel.org>,
"Christian Brauner (Microsoft)" <brauner@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Hridya Valsaraju" <hridya@google.com>,
"Joel Fernandes" <joel@joelfernandes.org>,
"Martijn Coenen" <maco@android.com>,
"Suren Baghdasaryan" <surenb@google.com>,
"Todd Kjos" <tkjos@android.com>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
"Arve Hjønnevåg" <arve@android.com>,
"Carlos Llamas" <cmllamas@google.com>
Subject: Re: [syzbot] WARNING in find_vma
Date: Tue, 9 Aug 2022 16:16:10 +0000 [thread overview]
Message-ID: <20220809161603.65enspb45xcmblc2@revolver> (raw)
In-Reply-To: <20220808153243.6a80c73ce4f14c50efef086f@linux-foundation.org>
* Andrew Morton <akpm@linux-foundation.org> [220808 18:32]:
> (cc people from the thread "Binder regression caused by commit a43cfc87caaf")
>
> On Mon, 08 Aug 2022 12:33:21 -0700 syzbot <syzbot+a7b60a176ec13cafb793@syzkaller.appspotmail.com> wrote:
>
> > syzbot has found a reproducer for the following issue on:
> >
> > HEAD commit: ca688bff68bc Add linux-next specific files for 20220808
> > git tree: linux-next
> > console output: https://syzkaller.appspot.com/x/log.txt?x=14807dfa080000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=4c20e006003cdecb
> > dashboard link: https://syzkaller.appspot.com/bug?extid=a7b60a176ec13cafb793
> > compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12999232080000
> > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15452c12080000
> >
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+a7b60a176ec13cafb793@syzkaller.appspotmail.com
> >
> > binder: 7796:7797 ioctl c0306201 20001480 returned -14
> > ------------[ cut here ]------------
> > WARNING: CPU: 1 PID: 7797 at include/linux/mmap_lock.h:155 mmap_assert_locked include/linux/mmap_lock.h:155 [inline]
> > WARNING: CPU: 1 PID: 7797 at include/linux/mmap_lock.h:155 find_vma+0xf8/0x270 mm/mmap.c:2255
> > Modules linked in:
> > CPU: 1 PID: 7797 Comm: syz-executor269 Not tainted 5.19.0-next-20220808-syzkaller #0
> > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
> > RIP: 0010:mmap_assert_locked include/linux/mmap_lock.h:155 [inline]
> > RIP: 0010:find_vma+0xf8/0x270 mm/mmap.c:2255
> > Code: 49 8d bc 24 28 01 00 00 be ff ff ff ff e8 40 2e c8 07 31 ff 89 c3 89 c6 e8 85 e2 c4 ff 85 db 0f 85 61 ff ff ff e8 b8 e5 c4 ff <0f> 0b e9 55 ff ff ff e8 ac e5 c4 ff 4c 89 e7 e8 54 38 fb ff 0f 0b
> > RSP: 0018:ffffc9000cee7530 EFLAGS: 00010293
> > RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
> > RDX: ffff88807c278000 RSI: ffffffff81b72058 RDI: 0000000000000005
> > RBP: 0000000020ffc000 R08: 0000000000000005 R09: 0000000000000000
> > R10: 0000000000000000 R11: 0000000000000000 R12: ffff88807dda3100
> > R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000
> > FS: 00007f5fdf1fb700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
> > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > CR2: 0000000000000000 CR3: 000000007d391000 CR4: 00000000003506f0
> > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> > Call Trace:
> > <TASK>
> > vma_lookup include/linux/mm.h:2743 [inline]
> > binder_alloc_get_vma drivers/android/binder_alloc.c:340 [inline]
> > binder_alloc_new_buf_locked drivers/android/binder_alloc.c:405 [inline]
> > binder_alloc_new_buf+0xd6/0x18b0 drivers/android/binder_alloc.c:590
> > binder_transaction+0x242e/0x9a80 drivers/android/binder.c:3187
> > binder_thread_write+0x8a9/0x3220 drivers/android/binder.c:3963
> > binder_ioctl_write_read drivers/android/binder.c:5024 [inline]
> > binder_ioctl+0x3470/0x6d00 drivers/android/binder.c:5311
> > vfs_ioctl fs/ioctl.c:51 [inline]
> > __do_sys_ioctl fs/ioctl.c:870 [inline]
> > __se_sys_ioctl fs/ioctl.c:856 [inline]
> > __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856
> > 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+0x63/0xcd
...
There are actually two call paths that will cause this BUG_ON to
trigger. The patch I've sent fixes both [1]. Besides the above
binder_alloc_new_buf_locked() call path, there is one that would be
triggered when reading the debugfs binder files. I'm guessing there
aren't test that cover the debugfs files.
[1] https://lore.kernel.org/linux-mm/20220809160618.1052539-1-Liam.Howlett@oracle.com/
Thanks,
Liam
next prev parent reply other threads:[~2022-08-09 16:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-08 7:34 syzbot
2022-08-08 19:33 ` syzbot
2022-08-08 22:32 ` Andrew Morton
2022-08-09 16:16 ` Liam Howlett [this message]
[not found] ` <0000000000003ee71e05e5e33e10@google.com>
2022-08-10 13:48 ` Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220809161603.65enspb45xcmblc2@revolver \
--to=liam.howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=arve@android.com \
--cc=brauner@kernel.org \
--cc=cmllamas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hridya@google.com \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=maco@android.com \
--cc=minchan@kernel.org \
--cc=omosnace@redhat.com \
--cc=surenb@google.com \
--cc=syzbot+a7b60a176ec13cafb793@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=tkjos@android.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox