Re: [PATCH 3/4] locking/ww_mutex: Treat ww_mutex_lock() like a trylock

Waiman Long
2021-03-18T02:55:09Z

On 3/17/21 10:24 PM, Boqun Feng wrote:
> Hi Waiman,
>
> Just a question out of curiosity: how does this problem hide so long?
> ;-) Because IIUC, both locktorture and ww_mutex_lock have been there for
> a while, so why didn't we spot this earlier?
>
> I ask just to make sure we don't introduce the problem because of some
> subtle problems in lock(dep).
>
You have to explicitly specify ww_mutex in the locktorture module
parameter to run the test. ww_mutex is usually not the intended target
of testing as there aren't that many places that use it. Even if someone
run it, it probably is not on a debug kernel.

Our QA people try to run locktorture on ww_mutex and discover that.

Cheers,
Longman