Index: kernel/generic/src/udebug/udebug_ops.c
===================================================================
--- kernel/generic/src/udebug/udebug_ops.c	(revision b1696194837e19c7e4d446880d20ede25043bad4)
+++ kernel/generic/src/udebug/udebug_ops.c	(revision d92b8e8f16d19c0ce7828d8dfbc2f178747ce076)
@@ -90,33 +90,9 @@
 	}
 
-	irq_spinlock_lock(&thread->lock, true);
-
 	/* Verify that 'thread' is a userspace thread. */
 	if (!thread->uspace) {
-		/* It's not, deny its existence */
-		irq_spinlock_unlock(&thread->lock, true);
 		mutex_unlock(&TASK->udebug.lock);
 		return ENOENT;
 	}
-
-	/* Verify debugging state. */
-	if (thread->udebug.active != true) {
-		/* Not in debugging session or undesired GO state */
-		irq_spinlock_unlock(&thread->lock, true);
-		mutex_unlock(&TASK->udebug.lock);
-		return ENOENT;
-	}
-
-	/* Now verify that the thread belongs to the current task. */
-	if (thread->task != TASK) {
-		/* No such thread belonging this task */
-		irq_spinlock_unlock(&thread->lock, true);
-		mutex_unlock(&TASK->udebug.lock);
-		return ENOENT;
-	}
-
-	irq_spinlock_unlock(&thread->lock, true);
-
-	/* Only mutex TASK->udebug.lock left. */
 
 	/*
@@ -126,4 +102,20 @@
 	 */
 	mutex_lock(&thread->udebug.lock);
+
+	/* Verify debugging state. */
+	if (thread->udebug.active != true) {
+		/* Not in debugging session or undesired GO state */
+		mutex_unlock(&thread->udebug.lock);
+		mutex_unlock(&TASK->udebug.lock);
+		return ENOENT;
+	}
+
+	/* Now verify that the thread belongs to the current task. */
+	if (thread->task != TASK) {
+		/* No such thread belonging this task */
+		mutex_unlock(&thread->udebug.lock);
+		mutex_unlock(&TASK->udebug.lock);
+		return ENOENT;
+	}
 
 	/* The big task mutex is no longer needed. */
@@ -388,7 +380,5 @@
 	/* FIXME: make sure the thread isn't past debug shutdown... */
 	list_foreach(TASK->threads, th_link, thread_t, thread) {
-		irq_spinlock_lock(&thread->lock, false);
 		bool uspace = thread->uspace;
-		irq_spinlock_unlock(&thread->lock, false);
 
 		/* Not interested in kernel threads. */
