]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 22 May 2016 21:44:58 +0000 (14:44 -0700)
Orabug: 20811436

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>
(cherry picked from commit f548d99ef4f5ec8f7080e88ad07c44d16d058ddc)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
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 = {