Bug fix: only complain about recursive locking before pthread_cond_wait() is called if the calling thread holds the lock.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8302 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/exp-drd/drd_cond.c b/exp-drd/drd_cond.c
index c5b04a4..e550fa6 100644
--- a/exp-drd/drd_cond.c
+++ b/exp-drd/drd_cond.c
@@ -219,7 +219,7 @@
   }
   tl_assert(p->mutex);
   q = mutex_get(p->mutex);
-  if (q && q->recursion_count > 0)
+  if (q && q->owner == thread_get_running_tid() && q->recursion_count > 0)
   {
     const ThreadId vg_tid = VG_(get_running_tid)();
     MutexErrInfo MEI = { q->a1, q->recursion_count, q->owner };