From: Diego Calleja <diegocg@gmail.com>
To: Andi Drebes <lists-receive@programmierforen.de>
Cc: linux-btrfs@vger.kernel.org, Andi Kleen <andi@firstfloor.org>
Subject: Re: Proper error handling on NULL pointers
Date: Wed, 21 Oct 2009 19:43:51 +0200 [thread overview]
Message-ID: <200910211943.51623.diegocg@gmail.com> (raw)
In-Reply-To: <200910191236.14046.lists-receive@programmierforen.de>
On Lunes 19 Octubre 2009 12:36:13 Andi Drebes escribi=C3=B3:
> However, is there any interest in patches fixing these problems? If y=
es: what would be the best strategy? Should we start fixing this "layer=
by layer" -- the low-level functions first and the high-level function=
s later on? Or should use come kind of "vertical approach" -- one low-l=
evel function and all of its callers at once?
I don't know what is the developer plan to fix that - apparently it's
not in the high-priority list (but it must be certainly in the priority
list, anyone who gets out of memory using btrfs will have some chances =
of
getting an oops - but notice that most of the important paths are ready
to handle errors reliably and there aren't many bug reports due to bad
oom handling, so it doesn't seems to be that critical).
I realized that it isn't really helpful to add BUG_ONs to failed alloca=
tion
paths, the code will oops itself as soon as it tries to use the NULL po=
inter,
so adding BUG_ONs is redundant. Passing the error to the callers and ha=
ndling
all that properly is the real fix, but since it requires auditing the w=
hole FS
it's probably not an easy task. I tried to do that with a couple of fun=
ctions,
but Kleen's mail made me realize that it isn't that easy.=20
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-10-21 17:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-19 10:36 Proper error handling on NULL pointers Andi Drebes
2009-10-21 17:43 ` Diego Calleja [this message]
2009-10-22 10:15 ` Andi Drebes
2009-10-22 14:10 ` Diego Calleja
2009-10-22 16:23 ` Andi Drebes
2009-10-23 18:08 ` Jeff Mahoney
2009-10-26 9:14 ` Chris Mason
2009-10-26 14:24 ` Jeff Mahoney
2009-10-30 13:27 ` Jeff Mahoney
2009-10-30 13:49 ` Chris Mason
2009-10-26 9:23 ` Chris Mason
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=200910211943.51623.diegocg@gmail.com \
--to=diegocg@gmail.com \
--cc=andi@firstfloor.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists-receive@programmierforen.de \
/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