aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>2011-03-16 19:05:34 -0400
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>2011-03-16 19:05:34 -0400
commit84e586ab00856e23b562386c5ea2402a1a2f4ea2 (patch)
tree69fe6d5e176ee25176cc68cfae53e0770bc17c06 /kernel
parente032cef3edb7e309d0becd2d90fd55982c4e70c1 (diff)
downloadlinux-linaro-android-84e586ab00856e23b562386c5ea2402a1a2f4ea2.tar.gz
markers-fix-marker-present-locking-reversed
markers fix marker present locking reversed Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/marker.c27
1 files changed, 5 insertions, 22 deletions
diff --git a/kernel/marker.c b/kernel/marker.c
index b8affbf884f..a8d9ee7c6fe 100644
--- a/kernel/marker.c
+++ b/kernel/marker.c
@@ -655,14 +655,16 @@ static void disable_marker(struct marker *elem)
}
/*
- * _is_marker_present - Check if a marker is present in kernel must be called
- * with markers_mutex held.
+ * is_marker_present - Check if a marker is present in kernel.
* @channel: channel name
* @name: marker name
*
+ * We cannot take the marker lock around calls to this function because it needs
+ * to take the module mutex within the iterator. Marker mutex nests inside
+ * module mutex.
* Returns 1 if the marker is present, 0 if not.
*/
-int _is_marker_present(const char *channel, const char *name)
+int is_marker_present(const char *channel, const char *name)
{
int ret;
struct marker_iter iter;
@@ -682,25 +684,6 @@ end:
marker_iter_stop(&iter);
return ret;
}
-EXPORT_SYMBOL_GPL(_is_marker_present);
-
-/*
- * is_marker_present - the wrapper of _is_marker_present
- * @channel: channel name
- * @name: marker name
- *
- * Returns 1 if the marker is present, 0 if not.
- */
-int is_marker_present(const char *channel, const char *name)
-{
- int ret;
-
- lock_markers();
- ret = _is_marker_present(channel, name);
- unlock_markers();
-
- return ret;
-}
EXPORT_SYMBOL_GPL(is_marker_present);
/*