Skip to contentSkip to conversation

arm: omap: iovmm: add missing mutex_unlock

PATCH In review Daniel Walker 3 participants 3 messages Sep 26, 2009 – Oct 2, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: omap: iovmm: add missing mutex_unlock

I was using Coccinelle with the mutex_unlock semantic patch, and it unconvered this problem. It appears to be a valid missing unlock issue. This change should correct it by moving the unlock below the label.

This patch is against the mainline kernel.

Cc Julia Lawall <[email protected]>
Cc Kevin Hilman <[email protected]>
Cc Tony Lindgren <[email protected]>
---
 arch/arm/plat-omap/iovmm.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/plat-omap/iovmm.c +2 -1
index 57f7122..9b6cb90 100644
@@ -363,8 +363,9 @@ void *da_to_va(struct iommu *obj, u32 da)
 		goto out;
 	}
 	va = area->va;
-	mutex_unlock(&obj->mmap_lock);
 out:
+	mutex_unlock(&obj->mmap_lock);
+
 	return va;
 }
 EXPORT_SYMBOL_GPL(da_to_va);
Signature · 1 line
1.6.0.4
#1 lore raw
Quoted 9 lines · Daniel Walker

I was using Coccinelle with the mutex_unlock semantic patch, and it unconvered this problem. It appears to be a valid missing unlock issue. This change should correct it by moving the unlock below the label.

This patch is against the mainline kernel.

Cc Julia Lawall <[email protected]>
Cc Tony Lindgren <[email protected]>
Quoted 26 lines
---
 arch/arm/plat-omap/iovmm.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/plat-omap/iovmm.c +2 -1
index 57f7122..9b6cb90 100644
@@ -363,8 +363,9 @@ void *da_to_va(struct iommu *obj, u32 da)
 		goto out;
 	}
 	va = area->va;
-	mutex_unlock(&obj->mmap_lock);
 out:
+	mutex_unlock(&obj->mmap_lock);
+
 	return va;
 }
 EXPORT_SYMBOL_GPL(da_to_va);
Signature · 6 lines
1.6.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

PATCH 1/1 arm: omap: iovmm: add missing mutex_unlock

In reply to Daniel Walker

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: omap-fixes

Initial commit ID (Likely to change): d3b34e8cb9c654902b5e486fbf27849dea48eeaf

PatchWorks
http://patchwork.kernel.org/patch/50274/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=d3b34e8cb9c654902b5e486fbf27849dea48eeaf