mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eduard Roccatello <lilo@roccatello.it>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] kernel/ptrace.c BUG_ON fixes
Date: Sun, 25 Jan 2004 23:28:56 +0100	[thread overview]
Message-ID: <200401252328.56344.lilo@roccatello.it> (raw)

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

             reply	other threads:[~2004-01-25 22:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-25 22:28 Eduard Roccatello [this message]
2004-01-25 22:33 ` Eduard Roccatello

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200401252328.56344.lilo@roccatello.it \
    --to=lilo@roccatello.it \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome