linux-stable/rust/kernel/alloc
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
..
allocator_test.rs rust: use custom FFI integer types 2024-11-10 23:58:00 +01:00
allocator.rs rust: use custom FFI integer types 2024-11-10 23:58:00 +01:00
kbox.rs rust: use custom FFI integer types 2024-11-10 23:58:00 +01:00
kvec.rs rust: alloc: implement collect for IntoIter 2024-10-15 23:10:32 +02:00
layout.rs rust: alloc: Fix ArrayLayout allocations 2024-11-25 00:11:07 +01:00