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] [day] [month] [year] [list]
Message-ID: <2025102231-sturdily-zoom-ada1@gregkh>
Date: Wed, 22 Oct 2025 10:48:44 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Ma Ke <make24@...as.ac.cn>
Cc: eajames@...ux.ibm.com, ninad@...ux.ibm.com, joel@....id.au,
	jk@...abs.org, linux-fsi@...ts.ozlabs.org,
	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	stable@...r.kernel.org
Subject: Re: [PATCH RESEND] Once cdev_device_add() failed, we should use
 put_device() to decrement reference count for cleanup. Or it could cause
 memory leak. Although operations in err_free_ida are similar to the
 operations in callback function fsi_slave_release(), put_device() is a
 correct handling operation as comments require when cdev_device_add() fails.

On Wed, Oct 22, 2025 at 04:34:52PM +0800, Ma Ke wrote:
> As comment of device_add() says, 'if device_add() succeeds, you should
> call device_del() when you want to get rid of it. If device_add() has
> not succeeded, use only put_device() to drop the reference count'.
> 
> Found by code review.

Your subject line looks a bit messed up :(


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ