diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2015-01-23 11:51:32 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-02 07:32:25 -0500 |
commit | 540d70d577dc3c78590f480c832e85ac28e5482a (patch) | |
tree | e29be25db8990b85d3a5e890d91da94fc1a654b1 /drivers/media/platform/coda | |
parent | 747d7646112c461fa1a2adb6655da6c51473cf1c (diff) |
[media] coda: free context buffers under buffer mutex
Make sure the buffer_mutex lock is taken in coda_bit_release
while coda_free_framebuffers and coda_free_context_buffers
are called.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/coda')
-rw-r--r-- | drivers/media/platform/coda/coda-bit.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c index 7cdddd55d65d..856b542b35b9 100644 --- a/drivers/media/platform/coda/coda-bit.c +++ b/drivers/media/platform/coda/coda-bit.c | |||
@@ -1319,8 +1319,10 @@ static void coda_seq_end_work(struct work_struct *work) | |||
1319 | 1319 | ||
1320 | static void coda_bit_release(struct coda_ctx *ctx) | 1320 | static void coda_bit_release(struct coda_ctx *ctx) |
1321 | { | 1321 | { |
1322 | mutex_lock(&ctx->buffer_mutex); | ||
1322 | coda_free_framebuffers(ctx); | 1323 | coda_free_framebuffers(ctx); |
1323 | coda_free_context_buffers(ctx); | 1324 | coda_free_context_buffers(ctx); |
1325 | mutex_unlock(&ctx->buffer_mutex); | ||
1324 | } | 1326 | } |
1325 | 1327 | ||
1326 | const struct coda_context_ops coda_bit_encode_ops = { | 1328 | const struct coda_context_ops coda_bit_encode_ops = { |