Locking
Locking
Posted Sep 24, 2024 11:55 UTC (Tue) by daroc (editor, #160859)In reply to: Locking by viro
Parent article: Resources for learning Rust for kernel development
The Rust standard library mutexes won't protect you from this, and neither will the ones designed (so far) in the kernel. But after Kangrejos, I went to RustConf. One of the presentations there was about how to encode lock dependency ordering into the type system so that it can be checked at compile time. So ensuring that there are no deadlocks from cyclic mutexes is possible, and the Rust-for-Linux folks could adopt that approach if they wanted to.
Keep an eye out for an article about that in the coming weeks.
