From: Sasha Levin <sashal@kernel.org>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH AUTOSEL 5.4 7/7] lib/generic-radix-tree.c: Fix rare race in __genradix_ptr_alloc()
Date: Wed, 23 Oct 2024 11:57:18 -0400 [thread overview]
Message-ID: <Zxkc3iLkPxXr6pE0@sashalap> (raw)
In-Reply-To: <g7gqwenbskp5wi7yljoaqdadmkjddouu4sez5fzryo35pu353i@fhyang5gfv7e>
On Sat, Oct 12, 2024 at 02:54:01PM -0400, Kent Overstreet wrote:
>On Sat, Oct 12, 2024 at 07:29:42AM GMT, Sasha Levin wrote:
>> From: Kent Overstreet <kent.overstreet@linux.dev>
>>
>> [ Upstream commit b2f11c6f3e1fc60742673b8675c95b78447f3dae ]
>>
>> If we need to increase the tree depth, allocate a new node, and then
>> race with another thread that increased the tree depth before us, we'll
>> still have a preallocated node that might be used later.
>>
>> If we then use that node for a new non-root node, it'll still have a
>> pointer to the old root instead of being zeroed - fix this by zeroing it
>> in the cmpxchg failure path.
>>
>> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>
>there wasn't any need to backport this, bcachefs is the only thing that
>uses genradix in multithreaded mode
Will do, thanks!
--
Thanks,
Sasha
next prev parent reply other threads:[~2024-10-23 15:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-12 11:29 [PATCH AUTOSEL 5.4 1/7] usbnet: ipheth: race between ipheth_close and error handling Sasha Levin
2024-10-12 11:29 ` [PATCH AUTOSEL 5.4 2/7] usbnet: ipheth: fix carrier detection in modes 1 and 4 Sasha Levin
2024-10-12 11:29 ` [PATCH AUTOSEL 5.4 3/7] net: ethernet: use ip_hdrlen() instead of bit shift Sasha Levin
2024-10-12 11:29 ` [PATCH AUTOSEL 5.4 4/7] net: phy: vitesse: repair vsc73xx autonegotiation Sasha Levin
2024-10-12 11:29 ` [PATCH AUTOSEL 5.4 5/7] Squashfs: sanity check symbolic link size Sasha Levin
2024-10-12 11:29 ` [PATCH AUTOSEL 5.4 6/7] of/irq: Prevent device address out-of-bounds read in interrupt map walk Sasha Levin
2024-10-12 11:29 ` [PATCH AUTOSEL 5.4 7/7] lib/generic-radix-tree.c: Fix rare race in __genradix_ptr_alloc() Sasha Levin
2024-10-12 18:54 ` Kent Overstreet
2024-10-23 15:57 ` Sasha Levin [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-08-23 14:05 [PATCH AUTOSEL 5.4 1/7] usbnet: ipheth: race between ipheth_close and error handling Sasha Levin
2024-08-23 14:06 ` [PATCH AUTOSEL 5.4 7/7] lib/generic-radix-tree.c: Fix rare race in __genradix_ptr_alloc() Sasha Levin
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=Zxkc3iLkPxXr6pE0@sashalap \
--to=sashal@kernel.org \
--cc=kent.overstreet@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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®