Messages in this thread Patch in this message | | | From | Eduard Roccatello <> | Subject | [PATCH] kernel/ptrace.c BUG_ON fixes | Date | Sun, 25 Jan 2004 23:28:56 +0100 |
| |
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.orig 2004-01-25 23:19:22.000000000 +0100 +++ /usr/src/linux/kernel/ptrace.c 2004-01-25 23:20:58.000000000 +0100 @@ -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; | |