From: Julia Lawall on
From: Julia Lawall <julia(a)>

The function begins and ends with a read_lock. The latter is changed to a

A simplified version of the semantic match that finds this problem is as
follows: (

// <smpl>
expression E1;
position p;


@r exists@
expression x <= locked.E1;
expression locked.E1;
expression E2;
identifier lock;
position locked.p,p1,p2;

*lock(a)p1 (E1@p,...);
.... when != E1
when != \(x = E2\|&x\)
*lock(a)p2 (E1,...);
// </smpl>

Signed-off-by: Julia Lawall <julia(a)>

Not tested

arch/sh/mm/pmb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c
index 18623ba..6379091 100644
--- a/arch/sh/mm/pmb.c
+++ b/arch/sh/mm/pmb.c
@@ -770,7 +770,7 @@ static void __init pmb_resize(void)
spin_unlock_irqrestore(&pmbe->lock, flags);

- read_lock(&pmb_rwlock);
+ read_unlock(&pmb_rwlock);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)
More majordomo info at
Please read the FAQ at