From: Max Krasnyansky <maxk@qualcomm.com>
To: Rakib Mullick <rakib.mullick@gmail.com>
Cc: pj@sgi.com, menage@google.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpuset : Handling improper memory allocation.
Date: Wed, 06 Aug 2008 13:13:35 -0700 [thread overview]
Message-ID: <489A05EF.7000108@qualcomm.com> (raw)
In-Reply-To: <b9df5fa10808061022r34e3a009k5060c8fab06bcd5c@mail.gmail.com>
Rakib Mullick wrote:
> This patch makes sure that , if kmalloc fails in
> "rebuild_sched_domains", then we've a place to go. If anything else,
> please let me know.
>
partition_sched_domains() can deal with attrs==NULL case. So we do not
have to abort domain building.
Max
> Thanks.
>
> Signed-off-by: Md.Rakib H. Mullick (rakib.mullick@gmail.com)
>
> --- linux-2.6.27-rc2.orig/kernel/cpuset.c 2008-08-06 16:23:26.000000000 +0600
> +++ linux-2.6.27-rc2/kernel/cpuset.c 2008-08-06 23:07:59.504441992 +0600
> @@ -615,7 +615,8 @@ void rebuild_sched_domains(void)
> if (dattr) {
> *dattr = SD_ATTR_INIT;
> update_domain_attr_tree(dattr, &top_cpuset);
> - }
> + } else
> + goto rebuild;
> *doms = top_cpuset.cpus_allowed;
> goto rebuild;
> }
> @@ -685,6 +686,8 @@ restart:
> if (!doms)
> goto rebuild;
> dattr = kmalloc(ndoms * sizeof(struct sched_domain_attr), GFP_KERNEL);
> + if (!dattr)
> + goto rebuild;
>
> for (nslot = 0, i = 0; i < csn; i++) {
> struct cpuset *a = csa[i];
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
next prev parent reply other threads:[~2008-08-06 20:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-06 17:22 Rakib Mullick
2008-08-06 20:13 ` Max Krasnyansky [this message]
2008-08-06 20:37 ` Paul Jackson
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=489A05EF.7000108@qualcomm.com \
--to=maxk@qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
--cc=pj@sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome