From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Dawei Feng <dawei.feng@seu.edu.cn>
Cc: andy@kernel.org, error27@gmail.com, hansg@kernel.org,
mchehab@kernel.org, sakari.ailus@linux.intel.com,
gregkh@linuxfoundation.org, abdelrahmanfekry375@gmail.com,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
linux-staging@lists.linux.dev, jianhao.xu@seu.edu.cn,
Zilin Guan <zilin@seu.edu.cn>
Subject: Re: [PATCH v2 2/2] media: atomisp: fix memory leak in atomisp_csi2_bridge_parse_firmware()
Date: Mon, 15 Jun 2026 14:12:25 +0300 [thread overview]
Message-ID: <ai_eGXhKhsV1fhlC@ashevche-desk.local> (raw)
In-Reply-To: <20260615072841.3113700-3-dawei.feng@seu.edu.cn>
On Mon, Jun 15, 2026 at 03:28:41PM +0800, Dawei Feng wrote:
> atomisp_csi2_bridge_parse_firmware() initializes isp->notifier and may
> allocate async notifier connections via v4l2_async_nf_add_fwnode_remote().
> However, these resources are currently leaked if a subsequent entity
> registration or probe step fails, or when the driver is removed.
>
> Fix this by introducing dedicated helpers to clean up and unregister the
> async notifier state. Call atomisp_notifier_cleanup() to release the
> allocated connections in both the entity registration failure path and the
> overall probe unwind path.
>
> Additionally, invoke atomisp_notifier_unregister() during the device
> remove path to ensure the notifier is properly unregistered from the V4L2
> core before its underlying resources are freed.
> Fixes: 8d28ec7e9145 ("media: atomisp: Add support for v4l2-async sensor registration")
> Signed-off-by: Zilin Guan <zilin@seu.edu.cn>
> Signed-off-by: Dawei Feng <dawei.feng@seu.edu.cn>
Same comment as per previous patch regarding to SoB chain.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-06-15 11:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 7:28 [PATCH v2 0/2] media: atomisp: fix probe memory leaks Dawei Feng
2026-06-15 7:28 ` [PATCH v2 1/2] media: atomisp: fix memory leak in atomisp_pci_probe() Dawei Feng
2026-06-15 11:11 ` Andy Shevchenko
2026-06-15 11:39 ` Dan Carpenter
2026-06-15 12:35 ` Dawei Feng
2026-06-15 13:51 ` Andy Shevchenko
2026-06-15 15:15 ` Dawei Feng
2026-06-15 13:49 ` Andy Shevchenko
2026-06-15 13:53 ` Dan Carpenter
2026-06-15 7:28 ` [PATCH v2 2/2] media: atomisp: fix memory leak in atomisp_csi2_bridge_parse_firmware() Dawei Feng
2026-06-15 11:12 ` Andy Shevchenko [this message]
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=ai_eGXhKhsV1fhlC@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=abdelrahmanfekry375@gmail.com \
--cc=andy@kernel.org \
--cc=dawei.feng@seu.edu.cn \
--cc=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=jianhao.xu@seu.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=zilin@seu.edu.cn \
/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