net: qrtr: Use xa_load in qrtr_get_service_id

In qrtr_get_service_id, use xa_load instead of node_get to check
if the node exists or not. Calling node_get from interrupt context
can cause potential deadlock since it calls into xa_store to
allocate the node if it does not exist.

Change-Id: Ida9f7a113417f0d184c0903004d94dd2eca6c472
Signed-off-by: Sarannya S <quic_sarannya@quicinc.com>
This commit is contained in:
Sarannya S 2022-06-01 15:33:10 +05:30 committed by Alexander Winkowski
parent 691b019901
commit ea009740e9
No known key found for this signature in database
GPG Key ID: 72762A66704CDE44

View File

@ -104,7 +104,7 @@ unsigned int qrtr_get_service_id(unsigned int node_id, unsigned int port_id)
struct qrtr_node *node;
unsigned long index;
node = node_get(node_id);
node = xa_load(&nodes, node_id);
if (!node)
return 0;