vmm: replace as <pointer> casts with safer alternatives

`as` casts can change mutability, which quickly leads to undefined
behavior.

Signed-off-by: Julian Schindel <mail@arctic-alpaca.de>
This commit is contained in:
Julian Schindel
2026-04-29 21:55:06 +02:00
committed by Rob Bradford
parent cb09c37c55
commit 8b101fb890
6 changed files with 15 additions and 14 deletions

View File

@@ -4902,7 +4902,7 @@ impl DeviceManager {
.remove_userspace_mapping(
mapping.addr.raw_value(),
mapping.mapping.size(),
mapping.mapping.as_ptr() as _,
mapping.mapping.as_ptr().cast(),
mapping.mergeable,
mapping.mem_slot,
)