From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Cong Nguyen <congnt264@gmail.com>
Cc: Bingbu Cao <bingbu.cao@intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Hans Verkuil <hverkuil@kernel.org>,
linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: staging/ipu7: fix async notifier leak on init error
Date: Tue, 28 Jul 2026 20:16:56 +0300 [thread overview]
Message-ID: <amjkCL_nSJk6VRSL@kekkonen.localdomain> (raw)
In-Reply-To: <20260727112239.812159-1-congnt264@gmail.com>
Hi Cong,
Thanks for the patch.
On Mon, Jul 27, 2026 at 06:22:39PM +0700, Cong Nguyen wrote:
> isys_notifier_init() initialises a v4l2 async notifier and then, for
> each CSI-2 port, adds a remote sensor subdev to the notifier's
> waiting_list via v4l2_async_nf_add_fwnode_remote(), which allocates a
> sensor_async_sd descriptor and takes a fwnode reference.
>
> If parsing or adding a later port fails, the code jumps to the
> "err_parse" label, which only drops the current endpoint fwnode
> reference and returns, without calling v4l2_async_nf_cleanup(). Any
> descriptors already added to the notifier for earlier ports are
> therefore leaked, and the caller's error path does not clean up the
> notifier either.
>
> Call v4l2_async_nf_cleanup() on the error path, matching the cleanup
> already performed when v4l2_async_nf_register() fails. This is safe as
> the notifier is always initialised before the loop is entered.
>
> Fixes: a516d36bdc3d ("media: staging/ipu7: add IPU7 input system device driver")
> Signed-off-by: Cong Nguyen <congnt264@gmail.com>
The patch is fine, but there's another issue there, see
<URL:https://linuxtv.org/mailman3/hyperkitty/list/media-ci@linuxtv.org/message/G5DTPKTRTWM5PBTFQJP2HI7T324FZF5D/>.
Feel free to post a patch for that, too.
--
Kind regards,
Sakari Ailus
next prev parent reply other threads:[~2026-07-28 17:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-27 11:22 Cong Nguyen
2026-07-28 17:16 ` Sakari Ailus [this message]
2026-07-30 10:47 ` Nguyễn Công
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=amjkCL_nSJk6VRSL@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=bingbu.cao@intel.com \
--cc=congnt264@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@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
all inboxes | Powered by JetHome®