linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com>, Raj <raju@mailandnews.com>,
	linux-kernel@vger.kernel.org, lhcs-devel@lists.sourceforge.net,
	Manfred Spraul <manfred@colorfullife.com>
Subject: Re: kernel BUG at kernel/exit.c:792!
Date: Wed, 3 Dec 2003 21:35:58 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.58.0312032126490.6831@earth> (raw)
In-Reply-To: <Pine.LNX.4.58.0312031203430.7406@home.osdl.org>


On Wed, 3 Dec 2003, Linus Torvalds wrote:

> This is one reason I hate some assert() with a passion. I've seen this
> way too often: somebody added an assert for something he thought was a
> bug, and then people are too damn afraid to just admit that it wasn't a
> bug at all, and just get rid of the f-ing assert. So instead, you add
> code to avoid the assert. And that code itself is non-obvious and
> broken.

i share your concern wrt. the abuse of asserts, but a few strategic
BUG_ON()s and WARN_ON()s have done wonders to 2.6 quality already. There
are certain types of bugs that are very hairy to detect if not caught
early enough. Stale thread pointers are one such thing.

in this specific case i doubt we'd be in a better position by not having
this assert. get_tid_list() would not crash the way it asserts now,
because task structs are not cleared after freeing. It might even lead to
incorrect thread lists being generated, if the task struct got reused for
another process. Or if it's reused for something else then we'd get much
rarer crashes in get_tid_list().

i think i'd rather like to see a few bad rounds of attempted fixes than
(much-) harder to reproduce bugs.

	Ingo

  parent reply	other threads:[~2003-12-03 20:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-03 10:08 kernel BUG at kernel/exit.c:792! Srivatsa Vaddagiri
     [not found] ` <3FCDCEA3.1020209@mailandnews.com>
2003-12-03 12:53   ` Srivatsa Vaddagiri
2003-12-03 17:46     ` Manfred Spraul
2003-12-03 17:52       ` Manfred Spraul
2003-12-03 18:19       ` Linus Torvalds
2003-12-03 19:58         ` Ingo Molnar
2003-12-03 19:59     ` Ingo Molnar
2003-12-03 20:08       ` Linus Torvalds
2003-12-03 20:18         ` Ingo Molnar
2003-12-03 20:19         ` Manfred Spraul
2003-12-03 20:26           ` Ingo Molnar
2003-12-03 20:31             ` Ingo Molnar
2003-12-03 20:55             ` Linus Torvalds
2003-12-03 20:35         ` Ingo Molnar [this message]
2003-12-03 15:51 ` Linus Torvalds
2003-12-03 20:03   ` Ingo Molnar
2003-12-03 20:09     ` Linus Torvalds

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=Pine.LNX.4.58.0312032126490.6831@earth \
    --to=mingo@elte.hu \
    --cc=lhcs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=raju@mailandnews.com \
    --cc=torvalds@osdl.org \
    --cc=vatsa@in.ibm.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;
as well as URLs for NNTP newsgroup(s).