Re: [PATCH net-next 2/3] net: qrtr: ns: Change nodes radix tree to xarray
From: Simon Horman
Date: Thu Jul 13 2023 - 10:55:30 EST
On Wed, Jul 12, 2023 at 04:56:30PM +0530, Vignesh Viswanathan wrote:
> There is a use after free scenario while iterating through the nodes
> radix tree despite the ns being a single threaded process. This can
> happen when the radix tree APIs are not synchronized with the
> rcu_read_lock() APIs.
>
> Convert the radix tree for nodes to xarray to take advantage of the
> built in rcu lock usage provided by xarray.
>
> Signed-off-by: Chris Lew <quic_clew@xxxxxxxxxxx>
> Signed-off-by: Vignesh Viswanathan <quic_viswanat@xxxxxxxxxxx>
Reviewed-by: Simon Horman <simon.horman@xxxxxxxxxxxx>