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
{{ message }}
Repository navigation
Use Box::assume_init in RBTreeNodeReservation::into_node once/if new_uninit is stabilised. #401
@wedsonaf
the @dakr changed this function in 2024/10/04 (git show 8373147ce4961)
the diff
- pub fn into_node(mut self, key: K, value: V) -> RBTreeNode<K, V> {- self.node.write(Node {- key,- value,- links: bindings::rb_node::default(),- });- // SAFETY: We just wrote to it.- let node = unsafe { self.node.assume_init() };+ pub fn into_node(self, key: K, value: V) -> RBTreeNode<K, V> {+ let node = KBox::write(+ self.node,+ Node {+ key,+ value,+ links: bindings::rb_node::default(),+ },+ );
He was removed the self.node.assume_init() ..
If you try pass the result of KBox::write(...) for KBox::assume_init(...) the compiler return
--> rust/kernel/rbtree.rs:1074:27
|
1074 | KBox::assume_init(node);
| ----------------- ^^^^ expected `Box<MaybeUninit<_>, Kmalloc>`, found `Box<Node<K, V>, Kmalloc>`
| |
| arguments to this function are incorrect
Activity
perf python: Don't stop building if python setuptools isn't installed
GuilhermeGiacomoSimoes commentedon Jan 11, 2025
@wedsonaf
the @dakr changed this function in 2024/10/04 (
git show 8373147ce4961)the diff
He was removed the
self.node.assume_init()..If you try pass the result of
KBox::write(...)forKBox::assume_init(...)the compiler returnMaybe this is already resolved.
LoongArch: BPF: Add struct ops support for trampoline
KVM: x86: Fix null pointer deref due to dummy array in trace_kvm_inj_…