1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/rust/kernel
Asahi Lina b7ed2b6f4e rust: alloc: Fix ArrayLayout allocations
We were accidentally allocating a layout for the *square* of the object
size due to a variable shadowing mishap.

Fixes memory bloat and page allocation failures in drm/asahi.

Reported-by: Janne Grunau <j@jannau.net>
Fixes: 9e7bbfa182 ("rust: alloc: introduce `ArrayLayout`")
Signed-off-by: Asahi Lina <lina@asahilina.net>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Link: https://lore.kernel.org/r/20241123-rust-fix-arraylayout-v1-1-197e64c95bd4@asahilina.net
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2024-11-25 00:11:07 +01:00
..
alloc rust: alloc: Fix ArrayLayout allocations 2024-11-25 00:11:07 +01:00
block rust: use custom FFI integer types 2024-11-10 23:58:00 +01:00
init rust: treewide: switch to our kernel Box type 2024-10-15 22:56:59 +02:00
list rust: enable arbitrary_self_types and remove Receiver 2024-10-07 21:39:57 +02:00
net rust: use custom FFI integer types 2024-11-10 23:58:00 +01:00
sync rust: use custom FFI integer types 2024-11-10 23:58:00 +01:00
alloc.rs rust: alloc: update module comment of alloc.rs 2024-10-15 23:10:32 +02:00
block.rs rust: block: introduce kernel::block::mq module 2024-06-14 07:45:04 -06:00
build_assert.rs rust: upgrade to Rust 1.68.2 2023-05-31 17:35:03 +02:00
device.rs device: rust: improve safety comments 2024-06-20 16:14:58 +02:00
error.rs rust: use custom FFI integer types 2024-11-10 23:58:00 +01:00
firmware.rs rust: firmware: fix invalid rustdoc link 2024-07-31 13:24:29 +02:00
init.rs rust: use custom FFI integer types 2024-11-10 23:58:00 +01:00
ioctl.rs rust: start using the #[expect(...)] attribute 2024-10-07 21:39:57 +02:00
kunit.rs rust: kunit: use C-string literals to clean warning 2024-10-01 23:46:42 +02:00
lib.rs rust: use custom FFI integer types 2024-11-10 23:58:00 +01:00
list.rs rust: enable clippy::undocumented_unsafe_blocks lint 2024-10-07 21:39:05 +02:00
net.rs rust: core abstractions for network PHY drivers 2023-12-15 09:35:50 +00:00
page.rs rust: page: add Rust version of PAGE_ALIGN 2024-10-21 20:34:46 +02:00
prelude.rs rust: alloc: add Vec to prelude 2024-10-15 23:10:32 +02:00
print.rs rust: start using the #[expect(...)] attribute 2024-10-07 21:39:57 +02:00
rbtree.rs rust: treewide: switch to our kernel Box type 2024-10-15 22:56:59 +02:00
sizes.rs rust: sizes: add commonly used constants 2024-08-30 10:27:34 +01:00
static_assert.rs rust: static_assert: add static_assert! macro 2022-12-04 01:59:16 +01:00
std_vendor.rs rust: std_vendor: update dbg macro from Rust upstream 2024-10-10 00:33:42 +02:00
str.rs rust: use custom FFI integer types 2024-11-10 23:58:00 +01:00
sync.rs rust: sync: add global lock support 2024-11-10 22:56:57 +01:00
task.rs rust: use custom FFI integer types 2024-11-10 23:58:00 +01:00
time.rs rust: use custom FFI integer types 2024-11-10 23:58:00 +01:00
transmute.rs rust: kernel: move FromBytes and AsBytes traits to a new transmute module 2024-10-10 00:33:42 +02:00
types.rs rust: use custom FFI integer types 2024-11-10 23:58:00 +01:00
uaccess.rs rust: use custom FFI integer types 2024-11-10 23:58:00 +01:00
workqueue.rs rust: treewide: switch to our kernel Box type 2024-10-15 22:56:59 +02:00