rpmsg: glink: Fix reuse intents memory leak issue
authorArun Kumar Neelakantam <aneela@codeaurora.org>
Fri, 4 Oct 2019 22:26:57 +0000 (15:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Dec 2019 10:04:37 +0000 (11:04 +0100)
commitbee84d7d8b13926af3933cd054a734bf71ef3ad8
tree20e6e9adf6b4a0b5ac41412a5d3c658f467ea7d8
parent06e60a45a429bcbe5be9eefb78b218382031f90e
rpmsg: glink: Fix reuse intents memory leak issue

commit b85f6b601407347f5425c4c058d1b7871f5bf4f0 upstream.

Memory allocated for re-usable intents are not freed during channel
cleanup which causes memory leak in system.

Check and free all re-usable memory to avoid memory leak.

Fixes: 933b45da5d1d ("rpmsg: glink: Add support for TX intents")
Cc: stable@vger.kernel.org
Acked-By: Chris Lew <clew@codeaurora.org>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Reported-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>
drivers/rpmsg/qcom_glink_native.c