Skip to content

Commit 73f0c11

Browse files
anderssonJakub Kicinski
authored andcommitted
net: qrtr: Stop rx_worker before freeing node
As the endpoint is unregistered there might still be work pending to handle incoming messages, which will result in a use after free scenario. The plan is to remove the rx_worker, but until then (and for stable@) ensure that the work is stopped before the node is freed. Fixes: bdabad3 ("net: Add Qualcomm IPC router") Cc: [email protected] Signed-off-by: Bjorn Andersson <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e47488b commit 73f0c11

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/qrtr/qrtr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ static void __qrtr_node_release(struct kref *kref)
150150
list_del(&node->item);
151151
mutex_unlock(&qrtr_node_lock);
152152

153+
cancel_work_sync(&node->work);
153154
skb_queue_purge(&node->rx_queue);
154155
kfree(node);
155156
}

0 commit comments

Comments
 (0)