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: <20260106091532.GA4723@cabron.k.g>
Date: Tue, 6 Jan 2026 11:15:32 +0200
From: Petko Manolov <petko.manolov@...sulko.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Paolo Abeni <pabeni@...hat.com>, davem@...emloft.net,
	netdev@...r.kernel.org, kuba@...nel.org, stable@...r.kernel.org
Subject: Re: [PATCH] net: usb: pegasus: fix memory leak on usb_submit_urb()
 failure

On 26-01-02 23:02:53, Andrew Lunn wrote:
> > Sure, will do.  However, my v2 patch makes use of __free() cleanup
> > functionality, which in turn only applies back to v6.6 stable kernels.
> 
> I would suggest not using the magical __free() cleanup.
> 
> https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html#using-device-managed-and-cleanup-h-constructs
> 
>     Low level cleanup constructs (such as __free()) can be used when
>     building APIs and helpers, especially scoped iterators. However,
>     direct use of __free() within networking core and drivers is
>     discouraged. Similar guidance applies to declaring variables
>     mid-function.


Heh, __free() is OK for APIs, but not drivers...

Maybe this text is a relic from the times auto cleanup was not fully understood?


		Petko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ