Skip to contentSkip to conversation

Locking API testsuite: mixed read-lock/lock-write ABBA: |FAILED|

DISCUSSION Jakub Kicinski 2 participants 2 messages Oct 11, 2017

lore
Share & tools
lore
#0 lore raw

I'm seeing a failure on net-next kernels (rc4):

[    0.000000]   --------------------------------------------------------------------------
[    0.000000]               recursive read-lock:             |  ok  |             |  ok  |
[    0.000000]            recursive read-lock #2:             |  ok  |             |  ok  |
[    0.000000]             mixed read-write-lock:             |  ok  |             |  ok  |
[    0.000000]             mixed write-read-lock:             |  ok  |             |  ok  |
[    0.000000]   mixed read-lock/lock-write ABBA:             |FAILED|             |  ok  |
[    0.000000]    mixed read-lock/lock-read ABBA:             |  ok  |             |  ok  |
[    0.000000]  mixed write-lock/lock-write ABBA:             |  ok  |             |  ok  |
[    0.000000]   --------------------------------------------------------------------------

Is this OK?

#1 lore raw
Quoted 12 lines · Jakub Kicinski

I'm seeing a failure on net-next kernels (rc4):

[    0.000000]   --------------------------------------------------------------------------
[    0.000000]               recursive read-lock:             |  ok  |             |  ok  |
[    0.000000]            recursive read-lock #2:             |  ok  |             |  ok  |
[    0.000000]             mixed read-write-lock:             |  ok  |             |  ok  |
[    0.000000]             mixed write-read-lock:             |  ok  |             |  ok  |
[    0.000000]   mixed read-lock/lock-write ABBA:             |FAILED|             |  ok  |
[    0.000000]    mixed read-lock/lock-read ABBA:             |  ok  |             |  ok  |
[    0.000000]  mixed write-lock/lock-write ABBA:             |  ok  |             |  ok  |
[    0.000000]   --------------------------------------------------------------------------
Quoted 1 line

Is this OK?

Yes,

commit e91498589746065e3ae95d9a00b068e525eec34f

Author: Peter Zijlstra <[email protected]>
Date:   Wed Aug 23 13:13:11 2017 +0200

locking/lockdep/selftests: Add mixed read-write ABBA tests

Currently lockdep has limited support for recursive readers, add a few mixed read-write ABBA selftests to show the extend of these limitations.

[ 0.000000] ----------------------------------------------------------------------------
[ 0.000000] | spin |wlock |rlock |mutex | wsem | rsem |
[ 0.000000] --------------------------------------------------------------------------

[ 0.000000] mixed read-lock/lock-write ABBA: |FAILED| | ok |
[ 0.000000] mixed read-lock/lock-read ABBA: | ok | | ok |
[ 0.000000] mixed write-lock/lock-write ABBA: | ok | | ok |

This clearly illustrates the case where lockdep fails to find a deadlock.