summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2019-09-18 10:21:17 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-05 12:47:40 +0200
commit088f93d00b81fe888fdd5f4a3e5b0383cbdf4d95 (patch)
tree7dc164f13a03a8d2c30b2af0046457b69166ac2b /net
parent8b831b69a733a1e669286e2e7d8eaf444cb513cb (diff)
downloadlinux-stable-088f93d00b81fe888fdd5f4a3e5b0383cbdf4d95.tar.gz
linux-stable-088f93d00b81fe888fdd5f4a3e5b0383cbdf4d95.tar.bz2
linux-stable-088f93d00b81fe888fdd5f4a3e5b0383cbdf4d95.zip
net: qrtr: Stop rx_worker before freeing node
[ Upstream commit 73f0c11d11329a0d6d205d4312b6e5d2512af7c5 ] 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: bdabad3e363d ("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>
Diffstat (limited to 'net')
-rw-r--r--net/qrtr/qrtr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c
index 084adea6a818..8d9a244f4534 100644
--- a/net/qrtr/qrtr.c
+++ b/net/qrtr/qrtr.c
@@ -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);
}