Re: [PATCH v2 0/2] Lock and Pointer guards

From: Peter Zijlstra
Date: Tue May 30 2023 - 05:27:41 EST

On Sat, May 27, 2023 at 12:18:04PM -0700, Linus Torvalds wrote:

> And before you say "unlock order doesn't matter" - that's actually not
> true. Unlock order does matter when you have things like
> "spin_lock_irq()" where the irq-off region then protects other locks
> too.

So I had already verified that GCC keeps them ordered, I see the
subthread with Ian and the documentation update request -- so all good

Also, lockdep would scream bloody murder if you get that wrong, so I
can certainly add something to the selftests that would detect this.