OSDN Git Service

net: qrtr: ns: Change servers radix tree to xarray
authorVignesh Viswanathan <quic_viswanat@quicinc.com>
Fri, 14 Jul 2023 05:58:44 +0000 (11:28 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Jul 2023 08:02:30 +0000 (09:02 +0100)
commit608a147a88728f84bbd2efdde3d4984339f1d872
treecc80ab09931b25c4680699b339679650b79b2ac2
parent89e970ea7fba6c2326de5d637a2ab1004548e0c9
net: qrtr: ns: Change servers radix tree to xarray

There is a use after free scenario while iterating through the servers
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 servers to xarray to take advantage of the
built in rcu lock usage provided by xarray.

Signed-off-by: Chris Lew <quic_clew@quicinc.com>
Signed-off-by: Vignesh Viswanathan <quic_viswanat@quicinc.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/qrtr/ns.c