lkml.org 
[lkml]   [2015]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel/locking/locktorture: fix deadlock in 'rw_lock_irq' type
On Sat, Mar 07, 2015 at 03:06:53AM +0300, Alexey Kodanev wrote:
> 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>

Good catch! If Davidlohr has no objections, I will queue this one.

Thanx, Paul

> ---
> 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 ec8cce2..6a2723c 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)
> 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 = {
> --
> 1.7.1
>



\
 
 \ /
  Last update: 2015-03-07 02:01    [W:0.086 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site