public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Suren Baghdasaryan <surenb@google.com>
To: akpm@linux-foundation.org
Cc: sfr@canb.auug.org.au, hca@linux.ibm.com, surenb@google.com,
	 linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/1] fixup! mm: fix a crash due to vma_end_read() that should have been removed
Date: Thu, 20 Feb 2025 12:02:08 -0800	[thread overview]
Message-ID: <20250220200208.323769-1-surenb@google.com> (raw)

Handling a vma lock failure due to vma being detached from under us got
changed but vma_end_read() in that path was left untouched while it should
have been removed. Remove it.

Fixes: 758f7664c3d1 ("mm: replace vm_lock and detached flag with a reference count")
Reported-by: Heiko Carstens <hca@linux.ibm.com>
Closes: https://lore.kernel.org/all/20250220185304.8313A7d-hca@linux.ibm.com/
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
---
 mm/memory.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/memory.c b/mm/memory.c
index cacf6d53bdf3..567b45e5d149 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -6496,7 +6496,6 @@ struct vm_area_struct *lock_vma_under_rcu(struct mm_struct *mm,
 	if (IS_ERR_OR_NULL(vma)) {
 		/* Check if the VMA got isolated after we found it */
 		if (PTR_ERR(vma) == -EAGAIN) {
-			vma_end_read(vma);
 			count_vm_vma_lock_event(VMA_LOCK_MISS);
 			/* The area was replaced with another one */
 			goto retry;

base-commit: f7ed46277aaa8f848f18959ff68469f5186ba87c
-- 
2.48.1.601.g30ceb7b040-goog


                 reply	other threads:[~2025-02-20 20:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250220200208.323769-1-surenb@google.com \
    --to=surenb@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=hca@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sfr@canb.auug.org.au \
    /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