[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=Mf=xW6HFVYOOVS2W6GOGHS2tCRtDYAco0rz4wmEpMZhmA@mail.gmail.com>
Date: Fri, 16 May 2025 14:32:54 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Johan Hovold <johan@...nel.org>
Cc: Linus Walleij <linus.walleij@...aro.org>, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>, stable@...r.kernel.org
Subject: Re: [PATCH] gpio: sysfs: add missing mutex_destroy()
On Fri, May 16, 2025 at 1:42 PM Johan Hovold <johan@...nel.org> wrote:
>
> On Fri, May 16, 2025 at 12:40:23PM +0200, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> >
> > We initialize the data->mutex in gpiod_export() but lack the
> > corresponding mutex_destroy() in gpiod_unexport() causing a resource
> > leak with mutex debugging enabled. Add the call right before kfreeing
> > the GPIO data.
>
> No, there's no resource leak and it's perfectly fine not to call
> mutex_destroy().
>
No, there's no leak but with lock debugging it still warns if the
mutex is locked when it's being destroyed so the change still makes
sense with a modified commit message.
> You can't just make shit up and then pretend to fix it...
>
There's no need for this kind of comment. You made your point clear in
the first sentence.
Bartosz
Powered by blists - more mailing lists