From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Mathis Foerst <mathis.foerst@mt.com>
Cc: linux-kernel@vger.kernel.org,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
manuel.traut@mt.com
Subject: Re: [PATCH v1 7/8] MT9M114: Fix deadlock in get_frame_interval/set_frame_interval
Date: Thu, 27 Feb 2025 09:42:36 +0000 [thread overview]
Message-ID: <Z8AzjGF-vuMedinG@kekkonen.localdomain> (raw)
In-Reply-To: <20250226153929.274562-8-mathis.foerst@mt.com>
Hi Mathis,
On Wed, Feb 26, 2025 at 04:39:28PM +0100, Mathis Foerst wrote:
> Getting / Setting the frame interval using the V4L2 subdev pad ops
> get_frame_interval/set_frame_interval causes a deadlock, as the subdev
> state is locked in the [1] but also in the driver itself.
>
> In [2] it's described that the caller is responsible to acquire and
> release the lock in this case. Therefore, acquiring the lock in the
> driver is wrong.
>
> Remove the lock acquisitions/releases from mt9m114_ifp_get_frame_interval()
> and mt9m114_ifp_set_frame_interval().
>
> [1] drivers/media/v4l2-core/v4l2-subdev.c - line 1129
> [2] Documentation/driver-api/media/v4l2-subdev.rst
>
> Signed-off-by: Mathis Foerst <mathis.foerst@mt.com>
Could you add:
Fixes: 24d756e914fc ("media: i2c: Add driver for onsemi MT9M114 camera sensor")
Cc: stable@vger.kernel.org
--
Regards,
Sakari Ailus
next prev parent reply other threads:[~2025-02-27 9:42 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 15:39 [PATCH v1 0/8] MT9M114 driver bugfix and improvements Mathis Foerst
2025-02-26 15:39 ` [PATCH v1 1/8] MT9M114: Add bypass-pll DT-binding Mathis Foerst
2025-02-26 16:08 ` Sakari Ailus
2025-03-04 11:53 ` Mathis Foerst
2025-02-26 15:39 ` [PATCH v1 2/8] MT9M114: Add pad-slew-rate DT-binding Mathis Foerst
2025-02-27 10:14 ` Sakari Ailus
2025-02-28 19:11 ` Conor Dooley
2025-03-04 11:48 ` Mathis Foerst
2025-03-04 16:39 ` Conor Dooley
2025-03-05 9:59 ` Mathis Foerst
2025-03-05 16:29 ` Conor Dooley
2025-03-05 16:30 ` Conor Dooley
2025-02-26 15:39 ` [PATCH v1 3/8] MT9M114: Add get_mbus_config Mathis Foerst
2025-02-26 17:13 ` Dave Stevenson
2025-02-27 8:53 ` Sakari Ailus
2025-03-05 11:44 ` Mathis Foerst
2025-02-26 15:39 ` [PATCH v1 4/8] MT9M114: Add option to bypass PLL Mathis Foerst
2025-02-26 15:39 ` [PATCH v1 5/8] MT9M114: Factor out mt9m114_configure_pa Mathis Foerst
2025-02-26 15:39 ` [PATCH v1 6/8] MT9M114: Allow set_selection while streaming Mathis Foerst
2025-02-26 15:39 ` [PATCH v1 7/8] MT9M114: Fix deadlock in get_frame_interval/set_frame_interval Mathis Foerst
2025-02-27 9:42 ` Sakari Ailus [this message]
2025-02-26 15:39 ` [PATCH v1 8/8] MT9M114: Set pad-slew-rate Mathis Foerst
2025-02-28 19:09 ` [PATCH v1 0/8] MT9M114 driver bugfix and improvements Conor Dooley
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=Z8AzjGF-vuMedinG@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=manuel.traut@mt.com \
--cc=mathis.foerst@mt.com \
--cc=mchehab@kernel.org \
--cc=robh@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;
as well as URLs for NNTP newsgroup(s).