linux-stable/drivers/rpmsg
Bjorn Andersson 84afec146d rpmsg: glink: Don't send pending rx_done during remove
commit c3dadc19b7 upstream.

Attempting to transmit rx_done messages after the GLINK instance is
being torn down will cause use after free and memory leaks. So cancel
the intent_work and free up the pending intents.

With this there are no concurrent accessors of the channel left during
qcom_glink_native_remove() and there is therefor no need to hold the
spinlock during this operation - which would prohibit the use of
cancel_work_sync() in the release function. So remove this.

Fixes: 1d2ea36eea ("rpmsg: glink: Add rx done command")
Cc: stable@vger.kernel.org
Acked-by: Chris Lew <clew@codeaurora.org>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-21 11:04:40 +01:00
..
Kconfig rpmsg: Switch to SPDX license identifier 2018-06-03 17:37:11 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qcom_glink_native.c rpmsg: glink: Don't send pending rx_done during remove 2019-12-21 11:04:40 +01:00
qcom_glink_native.h rpmsg: glink: Switch to SPDX license identifier 2018-06-03 17:37:15 -07:00
qcom_glink_rpm.c rpmsg: glink: Switch to SPDX license identifier 2018-06-03 17:37:15 -07:00
qcom_glink_smem.c rpmsg: glink: Set tail pointer to 0 at end of FIFO 2019-12-21 11:04:36 +01:00
qcom_smd.c rpmsg: smd: fix memory leak on channel create 2018-09-27 20:11:11 -07:00
rpmsg_char.c rpmsg: char: Migrate to iter versions of read and write 2018-08-27 17:06:57 -07:00
rpmsg_core.c rpmsg: core: fix comments 2019-08-26 23:08:25 -07:00
rpmsg_internal.h rpmsg: core: fix comments 2019-08-26 23:08:25 -07:00
virtio_rpmsg_bus.c rpmsg: virtio_rpmsg_bus: replace "%p" with "%pK" 2019-08-27 15:21:05 -07:00