You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lib: revert InPlaceWrite implementation for Arc<MaybeUninit<T>>
The kernel version of pinned_init implemented InPlaceWrite on UniqueArc,
not Arc. This ensures that InPlaceWrite is not writing to a shared Arc.
Userspace does not have this facility and therefore cannot lift the
kernel implementation of InPlaceWrite directly into Arc<>.
One possibility would be to use Arc::get_mut(), though this would introduce
a panic in the case where the Arc is shared. So just revert part of
commit 6841b61 ("rust: init: add `write_[pin_]init` functions", 2024-11-22).
Suggested-by: Benno Lossin <benno.lossin@proton.me>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
0 commit comments