[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2a7b5e72-604a-48e1-9c0e-3b9ad15e7f78@redhat.com>
Date: Thu, 26 Oct 2023 09:00:55 +0200
From: David Hildenbrand <david@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Charan Teja Kalla <quic_charante@...cinc.com>
Cc: Pavan Kondeti <quic_pkondeti@...cinc.com>, osalvador@...e.de,
dan.j.williams@...el.com, vbabka@...e.cz,
mgorman@...hsingularity.net, aneesh.kumar@...ux.ibm.com,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/sparsemem: fix race in accessing memory_section->usage
On 25.10.23 23:35, Andrew Morton wrote:
> On Tue, 17 Oct 2023 19:40:15 +0530 Charan Teja Kalla <quic_charante@...cinc.com> wrote:
>
>>>> * was allocated during boot.
>>>> */
>>>> if (!PageReserved(virt_to_page(ms->usage))) {
>>>> + synchronize_rcu();
>>>> kfree(ms->usage);
>>>> ms->usage = NULL;
>>>> }
>>> If we add NULL checks around ms->usage, this becomes
>>>
>>> tmp = rcu_replace_pointer(ms->usage, NULL, hotplug_locked());
>>> syncrhonize_rcu();
>>> kfree(tmp);
>> Per David input, I am working on using kfree_rcu().
>
> How's it coming along?
>
> Given that we're at 6.6-rc7 and given that this issue is causing
> daily crashes in your device farm, I'm thinking that we use the current
> version of your patch for 6.6 and for -stable. We can look at the
> kfree_rcu() optimization for later kernel releases?
Any particular reason we have to rush this in? It's been seen by one
company in a testing farm; there were no other reports, especially not
from production systems. ... and the issue seems to be quite old.
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists