diff options
| author | Alexey Kodanev <alexey.kodanev@oracle.com> | 2015-03-06 19:06:53 -0500 |
|---|---|---|
| committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-05-27 15:59:56 -0400 |
| commit | f548d99ef4f5ec8f7080e88ad07c44d16d058ddc (patch) | |
| tree | be050b69831204402b11f6ee79173461ece46017 /kernel/locking | |
| parent | 7d0ae8086b828311250c6afdf800b568ac9bd693 (diff) | |
locktorture: fix deadlock in 'rw_lock_irq' type
torture_rwlock_read_unlock_irq() must use read_unlock_irqrestore()
instead of write_unlock_irqrestore().
Use read_unlock_irqrestore() instead of write_unlock_irqrestore().
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/locking')
| -rw-r--r-- | kernel/locking/locktorture.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c index ec8cce259779..6a2723c88c33 100644 --- a/kernel/locking/locktorture.c +++ b/kernel/locking/locktorture.c | |||
| @@ -309,7 +309,7 @@ static int torture_rwlock_read_lock_irq(void) __acquires(torture_rwlock) | |||
| 309 | static void torture_rwlock_read_unlock_irq(void) | 309 | static void torture_rwlock_read_unlock_irq(void) |
| 310 | __releases(torture_rwlock) | 310 | __releases(torture_rwlock) |
| 311 | { | 311 | { |
| 312 | write_unlock_irqrestore(&torture_rwlock, cxt.cur_ops->flags); | 312 | read_unlock_irqrestore(&torture_rwlock, cxt.cur_ops->flags); |
| 313 | } | 313 | } |
| 314 | 314 | ||
| 315 | static struct lock_torture_ops rw_lock_irq_ops = { | 315 | static struct lock_torture_ops rw_lock_irq_ops = { |
