From: Michal Hocko <mhocko@suse.com>
To: Florian Westphal <fw@strlen.de>
Cc: netdev@vger.kernel.org, tgraf@suug.ch, urezki@gmail.com,
Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
herbert@gondor.apana.org.au, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, Martin Zaharinov <micron10@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH net] rhashtable: fix crash due to mm api change
Date: Mon, 26 Sep 2022 10:59:12 +0200 [thread overview]
Message-ID: <YzFp4H/rbdov7iDg@dhcp22.suse.cz> (raw)
In-Reply-To: <20220926083139.48069-1-fw@strlen.de>
On Mon 26-09-22 10:31:39, Florian Westphal wrote:
> Martin Zaharinov reports BUG() in mm land for 5.19.10 kernel:
> kernel BUG at mm/vmalloc.c:2437!
> invalid opcode: 0000 [#1] SMP
> CPU: 28 PID: 0 Comm: swapper/28 Tainted: G W O 5.19.9 #1
> [..]
> RIP: 0010:__get_vm_area_node+0x120/0x130
> __vmalloc_node_range+0x96/0x1e0
> kvmalloc_node+0x92/0xb0
> bucket_table_alloc.isra.0+0x47/0x140
> rhashtable_try_insert+0x3a4/0x440
> rhashtable_insert_slow+0x1b/0x30
> [..]
>
> bucket_table_alloc uses kvzalloc(GPF_ATOMIC). If kmalloc fails, this now
> falls through to vmalloc and hits code paths that assume GFP_KERNEL.
>
> I sent a patch to restore GFP_ATOMIC support in kvmalloc but mm
> maintainers rejected it.
>
> This patch is partial revert of
> commit 93f976b5190d ("lib/rhashtable: simplify bucket_table_alloc()"),
> to avoid kvmalloc for ATOMIC case.
>
> As kvmalloc doesn't warn when used with ATOMIC, kernel will only crash
> once vmalloc fallback occurs, so we may see more crashes in other areas
> in the future.
>
> Most other callers seem ok but kvm_mmu_topup_memory_cache looks like it
> might be affected by the same breakage, so Cc kvm@.
>
> Reported-by: Martin Zaharinov <micron10@gmail.com>
> Fixes: a421ef303008 ("mm: allow !GFP_KERNEL allocations for kvmalloc")
> Link: https://lore.kernel.org/linux-mm/Yy3MS2uhSgjF47dy@pc636/T/#t
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: kvm@vger.kernel.org
> Signed-off-by: Florian Westphal <fw@strlen.de>
Please continue in the original email thread until we sort out the most
reasonable solution for this.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2022-09-26 8:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-26 8:31 Florian Westphal
2022-09-26 8:37 ` Herbert Xu
2022-09-26 8:50 ` Florian Westphal
2022-09-26 9:37 ` Herbert Xu
2022-09-26 10:05 ` Florian Westphal
2022-09-26 10:17 ` Herbert Xu
2022-09-26 10:24 ` Florian Westphal
2022-09-27 7:04 ` Herbert Xu
2022-09-26 8:59 ` Michal Hocko [this message]
2022-09-26 15:19 ` Florian Westphal
2022-09-27 4:24 ` Martin Zaharinov
2022-09-27 4:44 ` Martin Zaharinov
2022-09-27 16:05 ` Martin Zaharinov
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=YzFp4H/rbdov7iDg@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=herbert@gondor.apana.org.au \
--cc=kuba@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=micron10@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pbonzini@redhat.com \
--cc=tgraf@suug.ch \
--cc=urezki@gmail.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®