6c0f1d09dfe2daee82ab7c5fd04c6fdc51b5a14e
[openwrt/staging/yousong.git] /
1 From 47046caff7455c46f07b7fd816cdd23ab9801842 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 381/703] 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. */