All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nuno Sá" <noname.nuno@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: sashiko@lists.linux.dev,
	"Nuno Sá via B4 Relay" <devnull+nuno.sa.analog.com@kernel.org>,
	linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v12 2/3] hwmon: ltc4283: Add support for the LTC4283 Swap Controller
Date: Thu, 30 Apr 2026 17:50:11 +0100	[thread overview]
Message-ID: <afOH5xx29LGJ9yKH@nsa> (raw)
In-Reply-To: <e2d14b68-7f3f-4bcb-8687-857e9335deb8@roeck-us.net>

On Thu, Apr 30, 2026 at 07:52:55AM -0700, Guenter Roeck wrote:
> On 4/30/26 03:03, sashiko-bot@kernel.org wrote:
> ...
> > > +	id = (client->adapter->nr << 10) | client->addr;
> > > +	adev = __devm_auxiliary_device_create(dev, KBUILD_MODNAME, "gpio",
> > > +					      &st->gpio_mask, id);
> > > +	if (!adev)
> > > +		return dev_err_probe(dev, -ENODEV, "Failed to add GPIO device\n");
> > 
> > Can this error path lead to a use-after-free?
> > 
> > According to the I2C subsystem rules, debugfs entries attached to the
> > client debugfs directory are only cleaned up during the client device
> > removal function on driver unbind.
> > 
> > If __devm_auxiliary_device_create() fails, the probe function aborts and
> > the devres subsystem frees the st pointer. However, the debugfs files
> > persist and retain operations that operate on the freed st pointer.
> > 
> 
> AI taking everything literally :-(. I'll have to reword that guidance again
> to include the probe error path.
> 

Yeah and it is annoying it always comes up with something that could
have been said before. Even more annoying some of are legit issues :)

- Nuno Sá

> Guenter
> 

  reply	other threads:[~2026-04-30 16:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30  8:52 [PATCH v12 0/3] hwmon: Add support for the LTC4283 Hot Swap Controller Nuno Sá
2026-04-30  8:52 ` Nuno Sá via B4 Relay
2026-04-30  8:52 ` [PATCH v12 1/3] dt-bindings: hwmon: Document the LTC4283 " Nuno Sá
2026-04-30  8:52   ` Nuno Sá via B4 Relay
2026-04-30  8:52 ` [PATCH v12 2/3] hwmon: ltc4283: Add support for " Nuno Sá
2026-04-30  8:52   ` Nuno Sá via B4 Relay
2026-04-30 10:03   ` sashiko-bot
2026-04-30 14:52     ` Guenter Roeck
2026-04-30 16:50       ` Nuno Sá [this message]
2026-05-01  6:10         ` Guenter Roeck
2026-05-01  9:07           ` Nuno Sá
2026-04-30  8:52 ` [PATCH v12 3/3] gpio: gpio-ltc4283: " Nuno Sá
2026-04-30  8:52   ` Nuno Sá via B4 Relay
2026-04-30 10:34   ` sashiko-bot

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=afOH5xx29LGJ9yKH@nsa \
    --to=noname.nuno@gmail.com \
    --cc=devnull+nuno.sa.analog.com@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=sashiko@lists.linux.dev \
    /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.