c/r: alloc_pid() should return -ENOMEM on failure
PATCH 1/1 c/r: alloc_pid() should return -ENOMEM on failure
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.
kernel/pid.c +3 -1
@@ -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--) {
A message that is not in the archive (sent off-list or not yet received): 20090819194654.GA22851-r/[email protected]
Added, thanks.
Quoted 26 lines · Sukadev Bhattiprolu
The
clone_with_pids()patchset changedalloc_pid()to return an error code in the pointer.alloc_pid()should then return-ENOMEMrather than NULL when memory allocations fails.Signed-off-by Sukadev Bhattiprolu <sukadev-r/[email protected]>Index:
linux-cr/kernel/pid.c
===================================================================kernel/pid.c +3
-1@@ -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