linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Herve Codina <herve.codina@bootlin.com>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH] gpio: free irqs that are still requested when the chip is being removed
Date: Thu, 19 Sep 2024 15:53:43 +0200	[thread overview]
Message-ID: <CAMRc=McyND+2SN_uNJMiveCPm7RJxF3V55GU2NLhkydoG9m0Hw@mail.gmail.com> (raw)
In-Reply-To: <20240919111324.10117-1-brgl@bgdev.pl>

On Thu, Sep 19, 2024 at 1:13 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> If we remove a GPIO chip that is also an interrupt controller with users
> not having freed some interrupts, we'll end up leaking resources as
> indicated by the following warning:
>
>   remove_proc_entry: removing non-empty directory 'irq/30', leaking at least 'gpio'
>
> As there's no way of notifying interrupt users about the irqchip going
> away and the interrupt subsystem is not plugged into the driver model and
> so not all cases can be handled by devlinks, we need to make sure to free
> all interrupts before the complete the removal of the provider.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> Herve: if I say I'll do something, then I'll do it, no need to remind me every
> six months. :) Anyway, this is a proposition of fixing the resource leak you
> reported with gpiomon in a more generic way so we also address the same issue
> for in-kernel users.
>

I noticed a problem here so I sent an improved version[1].

Bart

[1] https://lore.kernel.org/linux-gpio/20240919135104.3583-1-brgl@bgdev.pl/

      reply	other threads:[~2024-09-19 13:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-19 11:13 [PATCH] gpio: free irqs that are still requested when the chip is being removed Bartosz Golaszewski
2024-09-19 13:53 ` Bartosz Golaszewski [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='CAMRc=McyND+2SN_uNJMiveCPm7RJxF3V55GU2NLhkydoG9m0Hw@mail.gmail.com' \
    --to=brgl@bgdev.pl \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=herve.codina@bootlin.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).