linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Jeongjun Park <aha310510@gmail.com>, akpm@linux-foundation.org
Cc: andrii@kernel.org, osalvador@suse.de, Liam.Howlett@Oracle.com,
	surenb@google.com, christophe.leroy@csgroup.eu,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	syzbot+6246a83e7bd9f8a3e239@syzkaller.appspotmail.com
Subject: Re: [PATCH next] mm/maps: move kmalloc() call location in do_procmap_query() out of RCU critical section
Date: Wed, 2 Jul 2025 16:44:01 +0200	[thread overview]
Message-ID: <693725d9-a293-414f-a706-f77446e335b1@redhat.com> (raw)
In-Reply-To: <20250702135332.291866-1-aha310510@gmail.com>

On 02.07.25 15:53, Jeongjun Park wrote:
> In do_procmap_query(), we are allocating name_buf as much as name_buf_sz
> with kmalloc().
> 
> However, due to the previous commit eff061546ca5
> ("mm/maps: execute PROCMAP_QUERY ioctl under per-vma locks"),
> the location of kmalloc() is located inside the RCU critical section.
> 
> This causes might_sleep_if() to be called inside the RCU critical section,
> so we need to move the call location of kmalloc() outside the RCU critical
> section to prevent this.
> 
> Reported-by: syzbot+6246a83e7bd9f8a3e239@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=6246a83e7bd9f8a3e239
> Fixes: eff061546ca5 ("mm/maps: execute PROCMAP_QUERY ioctl under per-vma locks")

That commit is not upstream yet (and the commit id is not stable), so it 
should be squashed into the problematic commit.

As a side note: the patch subject of this and the original patch should 
start with "fs/proc/task_mmu", not "mm/maps".

-- 
Cheers,

David / dhildenb


  reply	other threads:[~2025-07-02 14:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-02 13:53 [PATCH next] mm/maps: move kmalloc() call location in do_procmap_query() out of RCU critical section Jeongjun Park
2025-07-02 14:44 ` David Hildenbrand [this message]
2025-07-02 23:34   ` Suren Baghdasaryan
2025-07-04  6:11     ` Suren Baghdasaryan

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=693725d9-a293-414f-a706-f77446e335b1@redhat.com \
    --to=david@redhat.com \
    --cc=Liam.Howlett@Oracle.com \
    --cc=aha310510@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrii@kernel.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=osalvador@suse.de \
    --cc=surenb@google.com \
    --cc=syzbot+6246a83e7bd9f8a3e239@syzkaller.appspotmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).