A first look at Rust in the 6.1 kernel
A first look at Rust in the 6.1 kernel
Posted Oct 14, 2022 23:41 UTC (Fri) by tialaramex (subscriber, #21167)In reply to: A first look at Rust in the 6.1 kernel by NYKevin
Parent article: A first look at Rust in the 6.1 kernel
So logically this code happens because the kernel is destroying this value, if Linux actually keeps the value alive that's a kernel bug, it's logically OK if the kernel can't or won't clean up the RAM used for the module, but it definitely can't expect that the Vec still works for example since Rust will have recursively called Drop::drop on the Vec inside this type (and so on) and the Vec is presumably delegating to some kernel allocator to get suitable blocks of memory which it will then give back when destroyed.
