mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
net: qrtr: Stop rx_worker before freeing node
[ Upstream commit73f0c11d11
] 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:bdabad3e36
("net: Add Qualcomm IPC router") Cc: stable@vger.kernel.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8b831b69a7
commit
088f93d00b
1 changed files with 1 additions and 0 deletions
|
@ -129,6 +129,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