drivers: soc: qcom: Added check to avoid opening multiple instance

Opening of multiple instance of voice_svc user space from app will
lead to pointer deference of private data within apr callback. As
multi-instance not supported added check to deny open() from user
space if previous instance hasn't been closed.

Change-Id: Ia5ef16c69a517760fc9d45530a8a41a333fa2a21
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
[haggertk: Backport to 3.4/msm8974]
CVE-2019-10497
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
1 file changed