From: Oren Laadan <orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
To: Sukadev Bhattiprolu
<sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Cc: Containers
<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
Subject: Re: [PATCH] c/r: alloc_pid() should return -ENOMEM on failure
Date: Tue, 25 Aug 2009 01:53:14 -0400 [thread overview]
Message-ID: <4A937C4A.9010109@librato.com> (raw)
In-Reply-To: <20090819194654.GA22851-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Added, thanks.
Sukadev Bhattiprolu wrote:
> The clone_with_pids() patchset changed alloc_pid() to return an error
> code in the pointer. alloc_pid() should then return -ENOMEM rather than
> NULL when memory allocations fails.
>
> Signed-off-by: Sukadev Bhattiprolu <sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
>
> Index: linux-cr/kernel/pid.c
> ===================================================================
> --- linux-cr.orig/kernel/pid.c 2009-08-19 12:43:45.000000000 -0700
> +++ linux-cr/kernel/pid.c 2009-08-19 12:45:33.000000000 -0700
> @@ -290,8 +290,10 @@
> int tpid;
>
> pid = kmem_cache_alloc(ns->pid_cachep, GFP_KERNEL);
> - if (!pid)
> + if (!pid) {
> + pid = ERR_PTR(-ENOMEM);
> goto out;
> + }
>
> tmp = ns;
> for (i = ns->level; i >= 0; i--) {
> _______________________________________________
> Containers mailing list
> Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
> https://lists.linux-foundation.org/mailman/listinfo/containers
prev parent reply other threads:[~2009-08-25 5:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-19 19:46 [PATCH] c/r: alloc_pid() should return -ENOMEM on failure Sukadev Bhattiprolu
[not found] ` <20090819194654.GA22851-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-08-25 5:53 ` Oren Laadan [this message]
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=4A937C4A.9010109@librato.com \
--to=orenl-rdfvbdnroixbdgjk7y7tuq@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox