X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Fbrcm2708%2Fpatches-4.19%2F950-0340-staging-vc-sm-cma-Ensure-mutex-and-idr-are-destroyed.patch;fp=target%2Flinux%2Fbrcm2708%2Fpatches-4.19%2F950-0340-staging-vc-sm-cma-Ensure-mutex-and-idr-are-destroyed.patch;h=6133840b716ed5f885e318db49cacd9608307fdc;hb=67dcc43f3a22dc3a7ac07a7065971b426feeb043;hp=0000000000000000000000000000000000000000;hpb=47a93a810f78adce5a130d287f82b28e9b54313c;p=openwrt%2Fstaging%2Fwigyori.git diff --git a/target/linux/brcm2708/patches-4.19/950-0340-staging-vc-sm-cma-Ensure-mutex-and-idr-are-destroyed.patch b/target/linux/brcm2708/patches-4.19/950-0340-staging-vc-sm-cma-Ensure-mutex-and-idr-are-destroyed.patch new file mode 100644 index 0000000000..6133840b71 --- /dev/null +++ b/target/linux/brcm2708/patches-4.19/950-0340-staging-vc-sm-cma-Ensure-mutex-and-idr-are-destroyed.patch @@ -0,0 +1,27 @@ +From 4027b08d96c68919f51c768a23877283ef5aefb9 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 8 Mar 2019 11:11:46 +0000 +Subject: [PATCH] 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 +--- + 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. */