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: <bb2f6786-b99e-424d-b54e-c56d9c7f1f81@app.fastmail.com>
Date: Thu, 03 Oct 2024 10:18:01 +0800
From: "Boqun Feng" <boqun.feng@...il.com>
To: "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
 "Danilo Krummrich" <dakr@...nel.org>
Cc: "Guilherme Giacomo Simoes" <trintaeoitogc@...il.com>, rafael@...nel.org,
 ojeda@...nel.org, alex.gaynor@...il.com, "Gary Guo" <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 Thu, Oct 3, 2024, at 12:07 AM, Greg KH wrote:
> 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.
>> > 

This work is because we have an issue, so this should really have a:

Closes: https://github.com/Rust-for-Linux/linux/issues/1088

tag.

Greg, could you add this when you queue this?

Guilherme, please add such a tag next time, so we can have things
tracked. Thanks!

Regards,
Boqun

>> > 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