]> git.karo-electronics.de Git - linux-beck.git/commitdiff
locktorture: fix deadlock in 'rw_lock_irq' type
authorAlexey Kodanev <alexey.kodanev@oracle.com>
Sat, 7 Mar 2015 00:06:53 +0000 (03:06 +0300)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 27 May 2015 19:59:56 +0000 (12:59 -0700)
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>
kernel/locking/locktorture.c

index ec8cce259779061dd863e6a48ff1dcfa1a7a131c..6a2723c88c33a680690912d3e244c5b135d4ab8a 100644 (file)
@@ -309,7 +309,7 @@ static int torture_rwlock_read_lock_irq(void) __acquires(torture_rwlock)
 static void torture_rwlock_read_unlock_irq(void)
 __releases(torture_rwlock)
 {
-       write_unlock_irqrestore(&torture_rwlock, cxt.cur_ops->flags);
+       read_unlock_irqrestore(&torture_rwlock, cxt.cur_ops->flags);
 }
 
 static struct lock_torture_ops rw_lock_irq_ops = {