From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Cc: linusw@kernel.org, brgl@kernel.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio: sloppy-logic-analyzer: Fix memory leak in gpio_la_poll_probe()
Date: Mon, 13 Jul 2026 16:50:10 +0200 [thread overview]
Message-ID: <alT7IvHFDSCw9kE1@ninjato> (raw)
In-Reply-To: <rraksab74pmllyp5zqr3tlbqe65twqgan5362hitk236mxguci@uhcrd2hzdi5c>
[-- Attachment #1: Type: text/plain, Size: 849 bytes --]
Hi Nihaal,
> What I meant was that after the priv->blob.data is allocated
> successfully in fops_buf_size_set(), the subsequent error returns in
> gpio_la_poll_probe() don't free the buffer, but directly return (since
> all the other allocations are device managed). And so I feel that there
> is a leak possible here.
This is actually true. We should fix this.
> If you prefer, I can remove the return code check for theh
> fops_buf_size_set() call and just have the devm_add_action_or_reset()
> part for releasing.
Yeah, I would like this. I think this part confused me a little when
reviewing. I will accept the patch with the retval check removed.
> We are using a prototype static analysis tool based on LLVM, which we
> are building for a research project.
Well, you got one success report now :)
Thanks and happy hacking,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-07-13 14:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 6:48 [PATCH] gpio: sloppy-logic-analyzer: Fix memory leak in gpio_la_poll_probe() Abdun Nihaal
2026-07-12 9:27 ` Wolfram Sang
2026-07-13 6:42 ` Abdun Nihaal
2026-07-13 14:50 ` Wolfram Sang [this message]
2026-07-12 9:33 ` Wolfram Sang
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=alT7IvHFDSCw9kE1@ninjato \
--to=wsa+renesas@sang-engineering.com \
--cc=brgl@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nihaal@cse.iitm.ac.in \
/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.