Skip to content
Snippets Groups Projects
Commit b7ed2b6f authored by Asahi Lina's avatar Asahi Lina :sparkles: Committed by Miguel Ojeda
Browse files

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: default avatarJanne Grunau <j@jannau.net>
Fixes: 9e7bbfa1 ("rust: alloc: introduce `ArrayLayout`")
Signed-off-by: default avatarAsahi Lina <lina@asahilina.net>
Acked-by: default avatarDanilo Krummrich <dakr@kernel.org>
Reviewed-by: default avatarNeal Gompa <neal@gompa.dev>
Link: https://lore.kernel.org/r/20241123-rust-fix-arraylayout-v1-1-197e64c95bd4@asahilina.net


Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent b160dc46
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment