Skip to contentSkip to conversation

BUG_ON() in kernel/exit.c

PATCH New Eric Sesterhenn / snakebyte 1 participant 1 message Jan 16, 2006 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 BUG_ON() in kernel/exit.c

hi,

this replaces two if() BUG(); statements
with BUG_ON in kernel/exit.c

kernel/exit.c renamed from kernel/exit.c.orig +2 -3
@@ -523,7 +523,7 @@ static void exit_mm(struct task_struct *
 		down_read(&mm->mmap_sem);
 	}
 	atomic_inc(&mm->mm_count);
-	if (mm != tsk->active_mm) BUG();
+	BUG_ON(mm != tsk->active_mm);
 	/* more a memory barrier than a real lock */
 	task_lock(tsk);
 	tsk->mm = NULL;
@@ -1477,8 +1477,7 @@ check_continued:
 		if (options & __WNOTHREAD)
 			break;
 		tsk = next_thread(tsk);
-		if (tsk->signal != current->signal)
-			BUG();
+		BUG_ON(tsk->signal != current->signal);
 	} while (tsk != current);
 
 	read_unlock(&tasklist_lock);

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors