From: Namhyung Kim <namhyung at gmail.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] [PATCH 1/2] perf_bundle: Check memory allocation failure
Date: Tue, 18 Sep 2012 23:33:44 +0900 [thread overview]
Message-ID: <1347978824.1771.4.camel@leonhard> (raw)
In-Reply-To: 50588442.7040404@linux.intel.com
[-- Attachment #1: Type: text/plain, Size: 687 bytes --]
2012-09-18 (화), 07:25 -0700, Arjan van de Ven:
> On 9/18/2012 7:21 AM, Namhyung Kim wrote:
> > Check return value of malloc/strdup not to make NULL dereferences.
>
> I don't mind these patches; they are clean code
>
> however, one of the core userspace developers at work basically said "we don't check for malloc NULL in userspace;
> if that ever happens the system is so screwed up anyway that you just cannot continue".
Thanks for the quick reply. :)
Basically I agree with you. But even in that case it'd be better
letting a user know about current situation somehow rather than just
segfault. Maybe by replacing them to xmalloc or so?
Thanks,
Namhyung
next reply other threads:[~2012-09-18 14:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-18 14:33 Namhyung Kim [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-09-18 14:25 [Powertop] [PATCH 1/2] perf_bundle: Check memory allocation failure Arjan van de Ven
2012-09-18 14:21 Namhyung Kim
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=1347978824.1771.4.camel@leonhard \
--to=powertop@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.