From: Philipp Zabel <p.zabel@pengutronix.de>
To: Ezequiel Garcia <ezequiel@collabora.com>,
linux-media@vger.kernel.org,
Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: kernel@collabora.com
Subject: Re: [PATCH 2/5] media: coda: Remove unbalanced and unneeded mutex unlock
Date: Fri, 26 Apr 2019 09:58:05 +0200 [thread overview]
Message-ID: <1556265485.3664.2.camel@pengutronix.de> (raw)
In-Reply-To: <20190425183546.16244-3-ezequiel@collabora.com>
On Thu, 2019-04-25 at 15:35 -0300, Ezequiel Garcia wrote:
> The mutex unlock in the threaded interrupt handler is not paired
> with any mutex lock. Remove it.
>
> This bug has been here for a really long time, so it applies
> to any stable repo.
>
> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
> ---
> drivers/media/platform/coda/coda-bit.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c
> index eaa86737fa04..bddd2f5c8c2b 100644
> --- a/drivers/media/platform/coda/coda-bit.c
> +++ b/drivers/media/platform/coda/coda-bit.c
> @@ -2308,7 +2308,6 @@ irqreturn_t coda_irq_handler(int irq, void *data)
> if (ctx == NULL) {
> v4l2_err(&dev->v4l2_dev,
> "Instance released before the end of transaction\n");
> - mutex_unlock(&dev->coda_mutex);
> return IRQ_HANDLED;
> }
I think this is right. I've never seen this message, and I'm not sure if
it is even possible to get a PIC_RUN completion interrupt with the m2m
context already released, since we reset the hardware on timeouts in
pic_run_work. Either way, the mutex is unlocked in pic_run_work after a
timeout if the completion is not triggered, so this one has to go.
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
regards
Philipp
next prev parent reply other threads:[~2019-04-26 7:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-25 18:35 [PATCH 0/5] Assorted CODA fixes Ezequiel Garcia
2019-04-25 18:35 ` [PATCH 1/5] media: coda: Print a nicer device registered message Ezequiel Garcia
2019-04-25 18:39 ` Hans Verkuil
2019-04-25 18:35 ` [PATCH 2/5] media: coda: Remove unbalanced and unneeded mutex unlock Ezequiel Garcia
2019-04-26 7:58 ` Philipp Zabel [this message]
2019-04-25 18:35 ` [PATCH 3/5] media: coda: Replace the threaded interrupt with a hard interrupt Ezequiel Garcia
2019-04-26 7:59 ` Philipp Zabel
2019-04-26 9:16 ` Philipp Zabel
2019-04-26 17:56 ` Ezequiel Garcia
2019-04-29 9:13 ` Philipp Zabel
2019-04-25 18:35 ` [PATCH 4/5] media: coda: Remove pic_run_work worker Ezequiel Garcia
2019-04-26 8:11 ` Philipp Zabel
2019-04-26 18:19 ` Ezequiel Garcia
2019-04-29 9:55 ` Philipp Zabel
2019-04-25 18:35 ` [PATCH 5/5] media: coda: Clear the interrupt reason Ezequiel Garcia
2019-04-26 8:12 ` Philipp Zabel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1556265485.3664.2.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=ezequiel@collabora.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=kernel@collabora.com \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox