From: Andrew Morton <akpm@linux-foundation.org>
To: David Rientjes <rientjes@google.com>
Cc: menage@google.com, linux-kernel@vger.kernel.org
Subject: Re: [patch] oom: print triggering task's cpuset and mems allowed
Date: Tue, 28 Oct 2008 14:42:34 -0700 [thread overview]
Message-ID: <20081028144234.35924bad.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.1.10.0810280222090.31219@chino.kir.corp.google.com>
On Tue, 28 Oct 2008 09:08:15 -0700 (PDT)
David Rientjes <rientjes@google.com> wrote:
> +#define CPUSET_NAME_LEN (128)
> +#define CPUSET_NODELIST_LEN (256)
> +static char cpuset_name[CPUSET_NAME_LEN];
> +static char cpuset_nodelist[CPUSET_NODELIST_LEN];
>
> ...
>
> + snprintf(cpuset_name, CPUSET_NAME_LEN,
> + dentry ? (const char *)dentry->d_name.name : "/");
nit: this requires that the reviewer (and the maintainer) ensure that
CPUSET_NAME_LEN=sizeof(cpuset_name). This must be done manually and
introduces risk.
Better would be:
static char cpuset_name[128];
...
snprintf(cpuset_name, sizeof(cpuset_name), ...);
next prev parent reply other threads:[~2008-10-28 21:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-25 0:05 [patch] oom: print triggering task's cpuset and mems allowed David Rientjes
2008-10-25 0:15 ` David Rientjes
2008-10-28 0:41 ` Andrew Morton
2008-10-28 16:08 ` David Rientjes
2008-10-28 21:42 ` Andrew Morton [this message]
2008-11-19 1:19 ` Li Zefan
2008-11-19 19:56 ` David Rientjes
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=20081028144234.35924bad.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
--cc=rientjes@google.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 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.