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: <2024100240-wrangle-condiment-3f0c@gregkh>
Date: Wed, 2 Oct 2024 18:07:18 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Danilo Krummrich <dakr@...nel.org>
Cc: Guilherme Giacomo Simoes <trintaeoitogc@...il.com>, rafael@...nel.org,
	ojeda@...nel.org, alex.gaynor@...il.com, boqun.feng@...il.com,
	gary@...yguo.net, bjorn3_gh@...tonmail.com, benno.lossin@...ton.me,
	aliceryhl@...gle.com, mcgrof@...nel.org, russ.weight@...ux.dev,
	dakr@...hat.com, a.hindborg@...nel.org,
	rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] rust: device: change the from_raw() function

On Wed, Oct 02, 2024 at 03:58:29PM +0200, Danilo Krummrich wrote:
> On Tue, Oct 01, 2024 at 05:56:03PM -0300, Guilherme Giacomo Simoes wrote:
> > The function Device::from_raw() increments a refcount by a call to
> > bindings::get_device(ptr). This can be confused because usually
> > from_raw() functions don't increment a refcount.
> > Hence, rename Device::from_raw() to avoid confuion with other "from_raw"
> > semantics.
> > 
> > The new name of function should be "get_device" to be consistent with
> > the function get_device() already exist in .c files.
> > 
> > This function body also changed, because the `into()` will convert the
> > `&'a Device` into `ARef<Device>` and also call `inc_ref` from the
> > `AlwaysRefCounted` trait implemented for Device.
> > 
> > Signed-off-by: Guilherme Giacomo Simoes <trintaeoitogc@...il.com>
> 
> Acked-by: Danilo Krummrich <dakr@...nel.org>

Thanks for the review, and Guilherme, for all of the revisions.  I'll
queue this up for this release soon so we don't get any code building on
the old api.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ