All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	 "Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	 Jann Horn <jannh@google.com>, Pedro Falcato <pfalcato@suse.de>,
	 Suren Baghdasaryan <surenb@google.com>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	 linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] fs/proc/task_mmu: fix missed VMAs when reading /proc/PID/maps and friends
Date: Mon, 26 Oct 2026 13:38:42 +0000	[thread overview]
Message-ID: <at9XoYEOWynH5skT@gremlin> (raw)
In-Reply-To: <at8-42OwXk2z6-HB@gremlin>

On Mon, Oct 26, 2026 at 01:35:23PM +0000, Lorenzo Stoakes (ARM) wrote:
> /* Returns true if mmap write unlocked. */
> static bool reset_walk_if_mmap_lock_dropped(struct vma_iterator *vmi,
> 		struct mm_struct *mm, unsigned long from_addr,
> 		unsigned int *last_seq)
> {
> 	if (vma_tree_maybe_changed(mm, *last_seq)) {
> 		/* Reset walk and re-speculate. */
> 		vma_iter_set(vmi, from_addr);
> 		return mmap_lock_speculate_try_begin(mm, last_seq);
> 	}
>
> 	return true;
> }

Actually, nicer as:

/* Returns true if mmap write unlocked. */
static bool reset_walk_if_mmap_lock_dropped(struct vma_iterator *vmi,
		struct mm_struct *mm, unsigned long from_addr,
		unsigned int *last_seq)
{
	if (!vma_tree_maybe_changed(mm, *last_seq))
		return true;

	/* Reset walk and re-speculate. */
	vma_iter_set(vmi, from_addr);
	return mmap_lock_speculate_try_begin(mm, last_seq);
}

--
Cheers, Lorenzo


  reply	other threads:[~2026-10-26 13:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 10:43 [PATCH] fs/proc/task_mmu: fix missed VMAs when reading /proc/PID/maps and friends David Hildenbrand (Arm)
2026-10-25 14:55 ` Suren Baghdasaryan
2026-10-25 19:01 ` Jose A. Perez de Azpillaga
2026-10-26 10:04   ` David Hildenbrand (Arm)
2026-10-26 15:56     ` Andrew Morton
2026-10-26 13:35 ` Lorenzo Stoakes (ARM)
2026-10-26 13:38   ` Lorenzo Stoakes (ARM) [this message]
2026-10-26 16:16   ` Suren Baghdasaryan
2026-10-26 17:19     ` David Hildenbrand (Arm)
2026-10-26 17:26       ` Lorenzo Stoakes (ARM)
2026-10-26 18:01         ` Liam R. Howlett
2026-10-26 18:05           ` Lorenzo Stoakes (ARM)

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=at9XoYEOWynH5skT@gremlin \
    --to=ljs@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=jannh@google.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pfalcato@suse.de \
    --cc=shakeel.butt@linux.dev \
    --cc=stable@vger.kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.