6133840b716ed5f885e318db49cacd9608307fdc
[openwrt/staging/luka.git] /
1 From 4027b08d96c68919f51c768a23877283ef5aefb9 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Fri, 8 Mar 2019 11:11:46 +0000
4 Subject: [PATCH] staging: vc-sm-cma: Ensure mutex and idr are
5 destroyed
6
7 map_lock and kernelid_map are created in probe, but not released
8 in release should the vcsm service not connect (eg running the
9 cutdown firmware).
10
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
12 ---
13 drivers/staging/vc04_services/vc-sm-cma/vc_sm.c | 2 ++
14 1 file changed, 2 insertions(+)
15
16 --- a/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
17 +++ b/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
18 @@ -752,7 +752,9 @@ static int bcm2835_vc_sm_cma_remove(stru
19
20 /* Stop the videocore shared memory service. */
21 vc_sm_cma_vchi_stop(&sm_state->sm_handle);
22 + }
23
24 + if (sm_state) {
25 idr_destroy(&sm_state->kernelid_map);
26
27 /* Free the memory for the state structure. */