mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+c473aa669b5e8a6f48d2@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [mm?] possible deadlock in mfill_get_vma
Date: Mon, 16 Mar 2026 10:21:07 +0800	[thread overview]
Message-ID: <tencent_4B6EDECCAEA7F306D592CA065589836ECB06@qq.com> (raw)
In-Reply-To: <69b6fc68.a00a0220.3b25d1.001e.GAE@google.com>

#syz test

diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c
index 9ffc80d0a51b..a3333d5c6454 100644
--- a/mm/userfaultfd.c
+++ b/mm/userfaultfd.c
@@ -218,6 +218,7 @@ static int mfill_get_vma(struct mfill_state *state)
 	if (IS_ERR(dst_vma))
 		return PTR_ERR(dst_vma);
 
+	state->vma = dst_vma;
 	/*
 	 * If memory mappings are changing because of non-cooperative
 	 * operation (e.g. mremap) running in parallel, bail out and
@@ -257,7 +258,6 @@ static int mfill_get_vma(struct mfill_state *state)
 		goto out_unlock;
 
 out:
-	state->vma = dst_vma;
 	return 0;
 
 out_unlock:


  parent reply	other threads:[~2026-03-16  2:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-15 18:37 syzbot
2026-03-16  0:57 ` Edward Adam Davis
2026-03-16  1:35   ` syzbot
2026-03-16  1:19 ` Hillf Danton
2026-03-16  1:56   ` syzbot
2026-03-16  1:49 ` Edward Adam Davis
2026-03-16  2:20   ` syzbot
2026-03-16  2:21 ` Edward Adam Davis [this message]
2026-03-16  3:07   ` syzbot
2026-03-16  3:11 ` [PATCH next] userfaultfd: unassigned vma leads to a potential unreleased locks Edward Adam Davis

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=tencent_4B6EDECCAEA7F306D592CA065589836ECB06@qq.com \
    --to=eadavis@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+c473aa669b5e8a6f48d2@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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

all inboxes | Powered by JetHome®