On Tue, Feb 14, 2023 at 12:05:27PM +0100, Peter Zijlstra wrote: > This is lock order per decree, if you get the order function wrong > lockdep will not see the inversion but you *will* deadlock. Yeah, that's what I mean. Given that a subclass isn't a fixed thing you assign to a lock, just something you magic up as needed - I just don't see what this gets us? Why not just tell lockdep what the order function is directly? (I know, I've been saying I'd write a patch for this, I'll get around to it, I swear :)