net: qrtr: Stop rx_worker before freeing node
authorBjorn Andersson <bjorn.andersson@linaro.org>
Wed, 18 Sep 2019 17:21:17 +0000 (10:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2019 11:09:27 +0000 (13:09 +0200)
commitabb04d0a9deaae736945f42dbf94b29bc8a592e8
treec2cf80191ae7cf85fdfe16c86b909f78ba04a010
parent6ea3bc4125064387e8a30f2230038fbde5948f46
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>
net/qrtr/qrtr.c