Skip to contentSkip to conversation

kernel/ptrace.c BUG_ON fixes

PATCH In review Eduard Roccatello 1 participant 2 messages Jan 25, 2004 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel/ptrace.c BUG_ON fixes

Hello

ptrace.c has some references to BUG() in form

if (condition)

	BUG();

I've changed them in BUG_ON(condition);

Cheers,
Eduard Roccatello

usr/src/linux/kernel/ptrace.c renamed from usr/src/linux/kernel/ptrace.c.orig +4 -4
@@ -28,8 +28,8 @@
  */
 void __ptrace_link(task_t *child, task_t *new_parent)
 {
-	if (!list_empty(&child->ptrace_list))
-		BUG();
+	BUG_ON(!list_empty(&child->ptrace_list));
+
 	if (child->parent == new_parent)
 		return;
 	list_add(&child->ptrace_list, &child->parent->ptrace_children);
@@ -46,8 +46,8 @@ void __ptrace_link(task_t *child, task_t
  */
 void __ptrace_unlink(task_t *child)
 {
-	if (!child->ptrace)
-		BUG();
+	BUG_ON(!child->ptrace);
+		
 	child->ptrace = 0;
 	if (list_empty(&child->ptrace_list))
 		return;
#1 lore raw
Quoted 1 line · Eduard Roccatello

I've changed them in BUG_ON(condition);

i forgot... this patch is against to 2.6.2-rc1

best regards,
Eduard