From: Eugen Hristev <ehristev@kernel.org>
To: Balakrishnan Sambath <balakrishnan.s@microchip.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Hans Verkuil <hverkuil@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v4 01/10] media: microchip-isc: fix awb_mutex and lock lifecycle
Date: Wed, 5 Aug 2026 09:19:42 +0300 [thread overview]
Message-ID: <521fa022-0e7a-4a6f-bcec-b87319471d76@kernel.org> (raw)
In-Reply-To: <20260803-balki-isc-prefix-fixes-v1-v4-1-f625d6aa0ae1@microchip.com>
On 8/3/26 13:20, Balakrishnan Sambath wrote:
> isc->lock and awb_mutex were initialised in isc_async_complete() and
> destroyed in isc_async_unbind(), tying their lifetime to the subdev
> bind/unbind cycle instead of the device:
>
> - isc_async_unbind() destroyed awb_mutex before cancel_work_sync(),
> which takes it;
> - a failed .complete() left them initialised, and isc->lock was
> destroyed only on the .complete() error path, so the normal unbind
> path leaked it;
> - a rebind runs .complete() again and reinitialises a live mutex.
>
> Initialise both with devm_mutex_init() at probe so they live for the
> whole device lifetime and are freed at remove, and drop the init and
> destroy from the .complete()/.unbind() callbacks.
>
> isc_async_complete_err then only returned ret, so drop the label and
> return directly at each error site.
>
> Fixes: 314c96e5203d ("media: atmel: atmel-isc-base: use mutex to lock awb workq from streaming")
> Cc: stable@vger.kernel.org
> Signed-off-by: Balakrishnan Sambath <balakrishnan.s@microchip.com>
Reviewed-by: Eugen Hristev <ehristev@kernel.org>
next prev parent reply other threads:[~2026-08-05 6:19 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 10:20 [PATCH v4 00/10] media: microchip-isc: AWB, stream-stop and endpoint-ref fixes Balakrishnan Sambath
2026-08-03 10:20 ` [PATCH v4 01/10] media: microchip-isc: fix awb_mutex and lock lifecycle Balakrishnan Sambath
2026-08-05 6:19 ` Eugen Hristev [this message]
2026-08-03 10:20 ` [PATCH v4 02/10] media: microchip-isc: take a reference on the parsed endpoints Balakrishnan Sambath
2026-08-07 10:37 ` Eugen Hristev
2026-08-11 11:03 ` Balakrishnan.S
2026-08-12 17:19 ` Eugen Hristev
2026-08-13 5:25 ` Balakrishnan.S
2026-08-03 10:20 ` [PATCH v4 03/10] media: microchip-isc: synchronize the IRQ before disabling clocks on stop Balakrishnan Sambath
2026-08-03 10:20 ` [PATCH v4 04/10] media: microchip-isc: disable histogram and flush AWB work on teardown Balakrishnan Sambath
2026-08-06 6:26 ` Eugen Hristev
2026-08-11 11:25 ` Balakrishnan.S
2026-08-03 10:20 ` [PATCH v4 05/10] media: microchip-isc: do not touch WB registers when not streaming Balakrishnan Sambath
2026-08-07 10:42 ` Eugen Hristev
2026-08-03 10:20 ` [PATCH v4 06/10] media: microchip-isc: store the unshifted PFE_CFG0 BPS value Balakrishnan Sambath
2026-08-03 10:20 ` [PATCH v4 07/10] media: microchip-isc: fix ISC_PFG_CFG0_BPS macro name typo Balakrishnan Sambath
2026-08-03 10:20 ` [PATCH v4 08/10] media: microchip-isc: fix PM runtime leak in AWB work handler Balakrishnan Sambath
2026-08-03 10:20 ` [PATCH v4 09/10] media: microchip-isc: fix SBGGR10 Bayer pattern Balakrishnan Sambath
2026-08-03 10:20 ` [PATCH v4 10/10] media: microchip-isc: fix WB offset and gain register field masking Balakrishnan Sambath
2026-08-05 6:17 ` Eugen Hristev
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=521fa022-0e7a-4a6f-bcec-b87319471d76@kernel.org \
--to=ehristev@kernel.org \
--cc=balakrishnan.s@microchip.com \
--cc=hverkuil@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=stable@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.