mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sanghyun Park <sanghyun.park.cnu@gmail.com>
To: yonghong.song@linux.dev, ast@kernel.org, daniel@iogearbox.net,
	andrii@kernel.org
Cc: Sanghyun Park <sanghyun.park.cnu@gmail.com>,
	bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
	puranjay@kernel.org
Subject: Re: [PATCH v2] bpf: Fix use-after-free on mm_struct in bpf_find_vma()
Date: Tue,  9 Jun 2026 19:26:15 +0900	[thread overview]
Message-ID: <20260609102618.3508682-2-sanghyun.park.cnu@gmail.com> (raw)
In-Reply-To: <a775c0b8-07f3-4265-8cfd-ec01ffd9efbf@linux.dev>

Hello Yonghong,

Thank you for the feedback. You are right on both points.

In v3 I will drop get_task_mm()+mmput() and instead mirror the pattern
from upstream commit d8e27d2d22b6 ("bpf: fix mm lifecycle in open-coded
task_vma iterator"): use spin_trylock(&task->alloc_lock) to read task->mm
and mmget() to pin it, then release the reference with mmput_async(). I
will also reject irqs-disabled contexts and !CONFIG_MMU on the foreign
path, and fix the whitespace damage.

v3 coming shortly.

Sincerely,
Sanghyun

      reply	other threads:[~2026-06-09 10:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29  8:01 Sanghyun Park
2026-06-02  5:55 ` Yonghong Song
2026-06-09 10:26   ` Sanghyun Park [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=20260609102618.3508682-2-sanghyun.park.cnu@gmail.com \
    --to=sanghyun.park.cnu@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=puranjay@kernel.org \
    --cc=yonghong.song@linux.dev \
    /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

all inboxes | Powered by JetHome®