Re: [PATCH v2 1/3] locking: Document the semantics of spin_is_locked()

From: David Howells
Date: Tue Apr 03 2018 - 09:52:43 EST


Andrea Parri <andrea.parri@xxxxxxxxxxxxxxxxxxxx> wrote:

> > It's more complicated than that. This function is dangerous and should be
> > used with extreme care. In the case where CONFIG_SMP=n the value is locked
> > one way or the other and it might be the wrong way.
>
> You mean "unlocked"? (aka, return 0)

No, I mean "fixed", sorry. We've had problems stemming from this before on UP
systems.

David