]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rust: driver: address soundness issue in `RegistrationOps`
authorDanilo Krummrich <dakr@kernel.org>
Fri, 3 Jan 2025 16:46:03 +0000 (17:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jan 2025 10:31:45 +0000 (11:31 +0100)
commite1a51c2bf4b3b20868a0e6e9520b11639bd363f1
tree2a1be8a3b07303bd8432fabb28e6e0ee09fd8661
parent9b880189327b9727640147253f3236ec5b3f704f
rust: driver: address soundness issue in `RegistrationOps`

The `RegistrationOps` trait holds some obligations to the caller and
implementers. While being documented, the trait and the corresponding
functions haven't been marked as unsafe.

Hence, markt the trait and functions unsafe and add the corresponding
safety comments.

This patch does not include any fuctional changes.

Reported-by: Gary Guo <gary@garyguo.net>
Closes: https://lore.kernel.org/rust-for-linux/20241224195821.3b43302b.gary@garyguo.net/
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://lore.kernel.org/r/20250103164655.96590-4-dakr@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rust/kernel/driver.rs
rust/kernel/pci.rs
rust/kernel/platform.rs