public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
To: Andrew Morton <akpm@zip.com.au>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch 2/16] list_head debugging
Date: Sat, 1 Jun 2002 14:19:02 -0300	[thread overview]
Message-ID: <20020601171902.GC14169@conectiva.com.br> (raw)
In-Reply-To: <3CF88863.BF3AF0FA@zip.com.au>

Em Sat, Jun 01, 2002 at 01:40:03AM -0700, Andrew Morton escreveu:
> A common and very subtle bug is to use list_heads which aren't on any
> lists.  It causes kernel memory corruption which is observed long after
> the offending code has executed.
 
> The patch nulls out the dangling pointers so we get a nice oops at the
> site of the buggy code.

> =====================================
> 
> --- 2.5.19/include/linux/list.h~list-debug	Sat Jun  1 01:18:05 2002
> +++ 2.5.19-akpm/include/linux/list.h	Sat Jun  1 01:18:05 2002
> @@ -94,6 +94,11 @@ static __inline__ void __list_del(struct
>  static __inline__ void list_del(struct list_head *entry)
>  {
>  	__list_del(entry->prev, entry->next);

#ifdef CONFIG_DEBUG_LIST_DEL_NULLIFY

> +	entry->next = 0;
> +	entry->prev = 0;

#endif

>  }

8) And get this configured in the Debug section of make *config

The kernel will always have bugs ;)

- Arnaldo

  reply	other threads:[~2002-06-01 17:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-01  8:40 [patch 2/16] list_head debugging Andrew Morton
2002-06-01 17:19 ` Arnaldo Carvalho de Melo [this message]
2002-06-03 13:55 ` Jan Harkes
2002-06-03 20:16   ` Andrew Morton
2002-06-03 20:41   ` Rik van Riel
2002-06-10 16:36     ` Jan Harkes
2002-06-14  9:22       ` Rik van Riel
  -- strict thread matches above, loose matches on Subject: below --
2002-06-07 14:17 Bernd Jendrissek
2002-06-07 18:30 ` Andrew Morton
2002-06-14 12:07   ` Jozsef Kadlecsik

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=20020601171902.GC14169@conectiva.com.br \
    --to=acme@conectiva.com.br \
    --cc=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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