Generic Linux architectural discussions
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Will Deacon <will@kernel.org>,
	syzbot <syzbot+a169a27b0538ba43e5d3@syzkaller.appspotmail.com>
Cc: akpm@linux-foundation.org, aneesh.kumar@kernel.org,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, npiggin@gmail.com, peterz@infradead.org,
	syzkaller-bugs@googlegroups.com, qi.zheng@linux.dev
Subject: Re: [syzbot] [mm?] [arch?] BUG: sleeping function called from invalid context in __tlb_batch_free_encoded_pages
Date: Mon, 1 Jun 2026 17:07:04 +0200	[thread overview]
Message-ID: <52287c46-aba8-4247-9939-4994bd57c4bd@kernel.org> (raw)
In-Reply-To: <ahbd7_KaUn45GK3v@willie-the-truck>

On 5/27/26 14:05, Will Deacon wrote:
> I finally got a chance to look at this one...
> 
> On Thu, Apr 30, 2026 at 12:21:35AM -0700, syzbot wrote:
>> syzbot found the following issue on:
>>
>> HEAD commit:    dca922e019dd Merge tag 'xsa48x-7.1-tag' of git://git.kerne..
>> git tree:       upstream
>> console output: https://syzkaller.appspot.com/x/log.txt?x=11cd6b6c580000
>> kernel config:  https://syzkaller.appspot.com/x/.config?x=59da38148f3a3d24
>> dashboard link: https://syzkaller.appspot.com/bug?extid=a169a27b0538ba43e5d3
>> compiler:       gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
>>
>> Unfortunately, I don't have any reproducer for this issue yet.
>>
>> Downloadable assets:
>> disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-dca922e0.raw.xz
>> vmlinux: https://storage.googleapis.com/syzbot-assets/7b447b1b93a9/vmlinux-dca922e0.xz
>> kernel image: https://storage.googleapis.com/syzbot-assets/af7830f5dabf/bzImage-dca922e0.xz
>>
>> IMPORTANT: if you fix the issue, please add the following tag to the commit:
>> Reported-by: syzbot+a169a27b0538ba43e5d3@syzkaller.appspotmail.com
>>
>> BUG: sleeping function called from invalid context at mm/mmu_gather.c:142
>> in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 5677, name: rm
>> preempt_count: 0, expected: 0
>> RCU nest depth: 1, expected: 0
>> 2 locks held by rm/5677:
>>  #0: ffff888022c20338 (&mm->mmap_lock){++++}-{4:4}, at: mmap_write_lock include/linux/mmap_lock.h:536 [inline]
>>  #0: ffff888022c20338 (&mm->mmap_lock){++++}-{4:4}, at: exit_mmap+0x22c/0xa10 mm/mmap.c:1308
>>  #1: ffffffff8e7e54e0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire.constprop.0+0x7/0x30 include/linux/rcupdate.h:300
>> CPU: 1 UID: 0 PID: 5677 Comm: rm Not tainted syzkaller #0 PREEMPT(full) 
>> Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
>> Call Trace:
>>  <TASK>
>>  __dump_stack lib/dump_stack.c:94 [inline]
>>  dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
>>  __might_resched.cold+0x1ec/0x232 kernel/sched/core.c:9162
>>  __tlb_batch_free_encoded_pages+0x11e/0x280 mm/mmu_gather.c:142
>>  tlb_batch_pages_flush mm/mmu_gather.c:151 [inline]
> 
> ... so we're getting deep in the gather code tearing down an mm, where
> we free the unmapped pages but we're somehow inside an RCU read-side
> critical section.
> 
> The last report on the sysbot dashboard is from 30th April, which
> coincides with 99ebc509eef5 ("mm: memcontrol: fix rcu unbalance in
> get_non_dying_memcg_end()") landing upstream. Unfortunately, there's no
> reproducer available to test that concretely but it looks like we can
> end up in there via the page freeing path. So hopefully this is fixed.

Yes, sounds reasonable.

-- 
Cheers,

David

      reply	other threads:[~2026-06-01 15:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30  7:21 [syzbot] [mm?] [arch?] BUG: sleeping function called from invalid context in __tlb_batch_free_encoded_pages syzbot
2026-05-27 12:05 ` Will Deacon
2026-06-01 15:07   ` David Hildenbrand (Arm) [this message]

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=52287c46-aba8-4247-9939-4994bd57c4bd@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@gmail.com \
    --cc=peterz@infradead.org \
    --cc=qi.zheng@linux.dev \
    --cc=syzbot+a169a27b0538ba43e5d3@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=will@kernel.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