lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aCckl9cC8fCBhHQT@hovoldconsulting.com>
Date: Fri, 16 May 2025 13:42:15 +0200
From: Johan Hovold <johan@...nel.org>
To: Bartosz Golaszewski <brgl@...ev.pl>
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 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().

You can't just make shit up and then pretend to fix it...

> Fixes: 6ffcb7971486 ("gpio: sysfs: use per-gpio locking")
> Cc: stable@...r.kernel.org
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ