mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
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. Change-Id: Ic35d1c0f5e5e4f297c7c05dd09c7c8a4d8b23cf4 Fixes:bdabad3e36("net: Add Qualcomm IPC router") Cc: stable@vger.kernel.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Git-commit:73f0c11d11Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by: Chris Lew <clew@codeaurora.org>
This commit is contained in:
parent
1dbe00d010
commit
a1811128de
1 changed files with 1 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue