From: Paul Jackson <pj@sgi.com>
To: Max Krasnyansky <maxk@qualcomm.com>
Cc: rakib.mullick@gmail.com, menage@google.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpuset : Handling improper memory allocation.
Date: Wed, 6 Aug 2008 15:37:00 -0500 [thread overview]
Message-ID: <20080806153700.dc12e5dc.pj@sgi.com> (raw)
In-Reply-To: <489A05EF.7000108@qualcomm.com>
Max wrote:
> partition_sched_domains() can deal with attrs==NULL case. So we do not
> have to abort domain building.
This might be a good place for a comment, since unchecked kmalloc()
calls look dangerous:
/* Convert <csn, csa> to <ndoms, doms> */
doms = kmalloc(ndoms * sizeof(cpumask_t), GFP_KERNEL);
if (!doms)
goto rebuild;
dattr = kmalloc(ndoms * sizeof(struct sched_domain_attr), GFP_KERNEL);
/* dattr == NULL is ok; partition_sched_domains() can cope with it. */
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.940.382.4214
next prev parent reply other threads:[~2008-08-06 20:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-06 17:22 [PATCH] cpuset : Handling improper memory allocation Rakib Mullick
2008-08-06 20:13 ` Max Krasnyansky
2008-08-06 20:37 ` Paul Jackson [this message]
2008-08-06 20:43 ` Max Krasnyansky
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=20080806153700.dc12e5dc.pj@sgi.com \
--to=pj@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maxk@qualcomm.com \
--cc=menage@google.com \
--cc=rakib.mullick@gmail.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.