From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bartosz Golaszewski <brgl@kernel.org>
Cc: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
Linus Walleij <linusw@kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] gpio: fix cleanup path on hog failure
Date: Tue, 9 Jun 2026 17:50:39 +0300 [thread overview]
Message-ID: <aigoP_Of5QturNle@ashevche-desk.local> (raw)
In-Reply-To: <CAMRc=Mc3vYpTepkjaPnK11rxveHb24X8O8gX6f=judZW5KGhAQ@mail.gmail.com>
On Tue, Jun 09, 2026 at 04:33:59PM +0200, Bartosz Golaszewski wrote:
> On Tue, Jun 9, 2026 at 4:25 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Tue, Jun 09, 2026 at 02:17:50PM +0200, Bartosz Golaszewski wrote:
> > > If gpiochip_hog_lines() successfully processes some hogs but fails on
> > > a later one, the error handling path in gpiochip_add_data_with_key()
> > > jumps directly to err_remove_of_chip. This leaks resources allocated
> > > earlier for ACPI, interrupts and hogs that were successfully processed.
> > > Use the right label in error path.
> >
> > This seems legit, but there is still a problem with implementation of
> > gpiochip_hog_lines(). Ideally it should clean up the crap it left when it
> > poops. With that, this one will require a brand new label just before
> > acpi_gpiochip_remove().
>
> Let's get this to stable and then rework it better in v7.2?
Sure. With that idea in mind,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
(only patch 2/2).
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-06-09 14:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 12:17 [PATCH 0/2] gpio: fix regressions in GPIO hogs after the code refactoring Bartosz Golaszewski
2026-06-09 12:17 ` [PATCH 1/2] gpio: don't process hogs on disabled nodes Bartosz Golaszewski
2026-06-09 14:16 ` Andy Shevchenko
2026-06-09 14:33 ` Bartosz Golaszewski
2026-06-09 12:17 ` [PATCH 2/2] gpio: fix cleanup path on hog failure Bartosz Golaszewski
2026-06-09 14:25 ` Andy Shevchenko
2026-06-09 14:33 ` Bartosz Golaszewski
2026-06-09 14:50 ` Andy Shevchenko [this message]
2026-06-09 12:47 ` [PATCH 0/2] gpio: fix regressions in GPIO hogs after the code refactoring Mika Westerberg
2026-06-10 7:30 ` (subset) " Bartosz Golaszewski
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=aigoP_Of5QturNle@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=brgl@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
/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®