From: Jonathan Cameron <jic23@kernel.org>
To: Wentao Liang <vulab@iscas.ac.cn>
Cc: andy@kernel.org, dlechner@baylibre.com,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
nuno.sa@analog.com, petre.rodan@subdimension.ro
Subject: Re: [PATCH] iio: accel: bma220: Fix trigger reference leak in bma220_common_probe()
Date: Sun, 8 Nov 2026 01:52:21 +0000 [thread overview]
Message-ID: <20261108015221.327af6e9@jic23-hlaptop> (raw)
In-Reply-To: <179396508376.2291875.4312877838122457985@iscas.ac.cn>
On Fri, 06 Nov 2026 11:38:03 -0000
Wentao Liang <vulab@iscas.ac.cn> wrote:
> Hi Jonathan,
>
> I am sorry for the very late reply and for the extra review work caused by
> sending many similar patches without first waiting for feedback.
>
> I understand that mixing devm-managed resources with manual trigger
> cleanup is not an acceptable solution here. A broader solution needs to
> account for runtime trigger changes from userspace and distinguish the
> references that managed cleanup should release.
>
> Please disregard this patch; I will not resend this approach as v2.
I have a plan for a more general solution to these trigger references.
Hopefully will get time tomorrow to try it out.
Key I think is that we need to stop setting iio_dev->trig directly
but instead just set a iio_dev->initial_trigger and then
the get() can be done at iio_dev registration time - lining up with
code that drops the reference in the remove paths.
Anyhow, you got me to finally spend a bit of time thinking about
the lifetimes of this stuff, so thanks for the push!
Jonathan
>
> Thank you for explaining the lifetime issues and how this work should be
> submitted. This has been an important lesson for me. I will personally
> review and respond to the remaining feedback one item at a time, and I
> will keep future submissions within my capacity to follow up promptly.
>
> For transparency, we use static analysis tools to identify candidates,
> then DeepSeek and GPT-6.1 Sol to assist with auditing and preparing fixes.
> I am responsible for verifying the findings and changes before submission.
>
> Best regards,
> Wentao
>
prev parent reply other threads:[~2026-11-08 1:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 16:08 Wentao Liang
2026-09-17 0:15 ` Jonathan Cameron
2026-11-06 11:38 ` Wentao Liang
2026-11-08 1:52 ` Jonathan Cameron [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=20261108015221.327af6e9@jic23-hlaptop \
--to=jic23@kernel.org \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=petre.rodan@subdimension.ro \
--cc=vulab@iscas.ac.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
all inboxes | Powered by JetHome®