From: Arjan van de Ven <arjan@infradead.org>
To: Luiz Fernando Capitulino <lcapitulino@mandriva.com.br>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>,
akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] slab: Adds two missing kmalloc() checks.
Date: Mon, 23 Jan 2006 18:06:30 +0100 [thread overview]
Message-ID: <1138035991.2977.58.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <20060123150128.eb12603f.lcapitulino@mandriva.com.br>
On Mon, 2006-01-23 at 15:01 -0200, Luiz Fernando Capitulino wrote:
> Hi Pekka, Arjan,
>
> On Mon, 23 Jan 2006 18:52:02 +0200
> Pekka Enberg <penberg@cs.helsinki.fi> wrote:
>
> | On Mon, 2006-01-23 at 18:38 +0200, Pekka Enberg wrote:
> | > > Looks good to me. Arjan, you had some objections last time around. Are
> | > > you okay with the change?
> |
> | On Mon, 2006-01-23 at 17:44 +0100, Arjan van de Ven wrote:
> | > I still fail to see the point. Has anyone EVER seen these trigger????
> |
> | Yeah, we probably won't. They seem useful for people who hunt unchecked
> | kmalloc() calls, though.
>
> It really looks useful to me. You don't check for fail because someone has
> seen the fail happen. You check for fail in order to have a robust program.
Generally you are right. You check for fail because you can recover the
failure. In this case the code happens during real early boot, and if it
fails you CANNOT BOOT. And you have so little memory, that it's highly
unlikely that you even got this far. -> You only make the kernel bigger
without any win at all.
Don't get me wrong. Most of the null pointer checks are useful. Just the
ones where you can't recover ANYWAY are not. A BUG_ON() is not better
than just hitting a GPF due to a null pointer, in either case you don't
boot, and probably so early you don't get to see the message either, and
when you do see it.. you get no additional information.
prev parent reply other threads:[~2006-01-23 17:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-23 15:31 Luiz Fernando Capitulino
2006-01-23 16:38 ` Pekka Enberg
2006-01-23 16:44 ` Arjan van de Ven
2006-01-23 16:52 ` Pekka Enberg
2006-01-23 17:01 ` Luiz Fernando Capitulino
2006-01-23 17:06 ` Arjan van de Ven [this message]
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=1138035991.2977.58.camel@laptopd505.fenrus.org \
--to=arjan@infradead.org \
--cc=akpm@osdl.org \
--cc=lcapitulino@mandriva.com.br \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
/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
all inboxes | Powered by JetHome®