aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.19/950-0376-staging-vc-sm-cma-Ensure-mutex-and-idr-are-destroyed.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm2708/patches-4.19/950-0376-staging-vc-sm-cma-Ensure-mutex-and-idr-are-destroyed.patch')
-rw-r--r--target/linux/brcm2708/patches-4.19/950-0376-staging-vc-sm-cma-Ensure-mutex-and-idr-are-destroyed.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.19/950-0376-staging-vc-sm-cma-Ensure-mutex-and-idr-are-destroyed.patch b/target/linux/brcm2708/patches-4.19/950-0376-staging-vc-sm-cma-Ensure-mutex-and-idr-are-destroyed.patch
new file mode 100644
index 0000000000..fb6ad95443
--- /dev/null
+++ b/target/linux/brcm2708/patches-4.19/950-0376-staging-vc-sm-cma-Ensure-mutex-and-idr-are-destroyed.patch
@@ -0,0 +1,27 @@
+From 0382cc0391c16a76fdf6f1e53c17a0704648c6fb Mon Sep 17 00:00:00 2001
+From: Dave Stevenson <dave.stevenson@raspberrypi.org>
+Date: Fri, 8 Mar 2019 11:11:46 +0000
+Subject: [PATCH 376/773] staging: vc-sm-cma: Ensure mutex and idr are
+ destroyed
+
+map_lock and kernelid_map are created in probe, but not released
+in release should the vcsm service not connect (eg running the
+cutdown firmware).
+
+Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
+---
+ drivers/staging/vc04_services/vc-sm-cma/vc_sm.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
++++ b/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
+@@ -752,7 +752,9 @@ static int bcm2835_vc_sm_cma_remove(stru
+
+ /* Stop the videocore shared memory service. */
+ vc_sm_cma_vchi_stop(&sm_state->sm_handle);
++ }
+
++ if (sm_state) {
+ idr_destroy(&sm_state->kernelid_map);
+
+ /* Free the memory for the state structure. */