Commit 73f0c11d authored by Bjorn Andersson's avatar Bjorn Andersson Committed by Jakub Kicinski

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: bdabad3e ("net: Add Qualcomm IPC router")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
parent e47488b2
......@@ -150,6 +150,7 @@ static void __qrtr_node_release(struct kref *kref)
list_del(&node->item);
mutex_unlock(&qrtr_node_lock);
cancel_work_sync(&node->work);
skb_queue_purge(&node->rx_queue);
kfree(node);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment