From: David Hildenbrand <david@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
syzbot+3511625422f7aa637f0d@syzkaller.appspotmail.com,
stable@vger.kernel.org, Christoph Lameter <cl@linux.com>
Subject: Re: [PATCH v1] mm/mempolicy: fix migrate_to_node() assuming there is at least one VMA in a MM
Date: Fri, 22 Nov 2024 10:32:19 +0100 [thread overview]
Message-ID: <608c7f17-037b-401b-9336-c26bd45d3147@redhat.com> (raw)
In-Reply-To: <20241121221937.c41ee2b5e8534729e94fc104@linux-foundation.org>
On 22.11.24 07:19, Andrew Morton wrote:
> On Wed, 20 Nov 2024 15:27:46 -0500 "Liam R. Howlett" <Liam.Howlett@oracle.com> wrote:
>
>> I hate the extra check because syzbot can cause this as this should
>> basically never happen in real life, but it seems we have to add it.
>
> So..
>
> --- a/mm/mempolicy.c~mm-mempolicy-fix-migrate_to_node-assuming-there-is-at-least-one-vma-in-a-mm-fix
> +++ a/mm/mempolicy.c
> @@ -1080,7 +1080,7 @@ static long migrate_to_node(struct mm_st
>
> mmap_read_lock(mm);
> vma = find_vma(mm, 0);
> - if (!vma) {
> + if (unlikely(!vma)) {
> mmap_read_unlock(mm);
> return 0;
> }
> _
>
> ?
Why not, at least for documentation purposes. Because I don't think this
is any fast-path we really care about, so expect the runtime effects to
be mostly negligible. Thanks!
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2024-11-22 9:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-20 20:11 David Hildenbrand
2024-11-20 20:27 ` Liam R. Howlett
2024-11-20 20:49 ` David Hildenbrand
2024-11-22 6:19 ` Andrew Morton
2024-11-22 9:32 ` David Hildenbrand [this message]
2024-11-22 14:44 ` Liam R. Howlett
2024-11-22 14:57 ` David Hildenbrand
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=608c7f17-037b-401b-9336-c26bd45d3147@redhat.com \
--to=david@redhat.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=stable@vger.kernel.org \
--cc=syzbot+3511625422f7aa637f0d@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