All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel/ptrace.c BUG_ON fixes
@ 2004-01-25 22:28 Eduard Roccatello
  2004-01-25 22:33 ` Eduard Roccatello
  0 siblings, 1 reply; 2+ messages in thread
From: Eduard Roccatello @ 2004-01-25 22:28 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 145 bytes --]

Hello

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

if (condition)
	BUG();

I've changed them in BUG_ON(condition);

Cheers,
Eduard Roccatello

[-- Attachment #2: ptrace_clean.patch --]
[-- Type: text/x-diff, Size: 673 bytes --]

--- /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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] kernel/ptrace.c BUG_ON fixes
  2004-01-25 22:28 [PATCH] kernel/ptrace.c BUG_ON fixes Eduard Roccatello
@ 2004-01-25 22:33 ` Eduard Roccatello
  0 siblings, 0 replies; 2+ messages in thread
From: Eduard Roccatello @ 2004-01-25 22:33 UTC (permalink / raw)
  To: linux-kernel

On Sunday 25 January 2004 23:28, Eduard Roccatello wrote:
> I've changed them in BUG_ON(condition);
i forgot... this patch is against to 2.6.2-rc1

best regards,
Eduard


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-01-25 22:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-25 22:28 [PATCH] kernel/ptrace.c BUG_ON fixes Eduard Roccatello
2004-01-25 22:33 ` Eduard Roccatello

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.