misc: fastrpc: Reference count channel context
authorBjorn Andersson <bjorn.andersson@linaro.org>
Thu, 29 Aug 2019 09:29:22 +0000 (10:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Sep 2019 11:35:10 +0000 (13:35 +0200)
commit278d56f970ae6e0bcda8970e78e088e3efe43da8
tree7d661482a3af355aece1bc9f956426c4cef726c9
parent474d83edaf564879eeaf02ff60c8940a150cff79
misc: fastrpc: Reference count channel context

The channel context is referenced from the fastrpc user and might as
user space holds the file descriptor open outlive the fastrpc device,
which is removed when the remote processor is shutting down.

Reference count the channel context in order to retain this object until
all references has been relinquished.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Mayank Chopra <mak.chopra@codeaurora.org>
Signed-off-by: Abhinav Asati <asatiabhi@codeaurora.org>
Signed-off-by: Vamsi Singamsetty <vamssi@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20190829092926.12037-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/fastrpc.c