[lkml]   [2020]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] pid: Fix error return value in some cases
On Fri, Mar 06, 2020 at 11:23:14AM -0600, wrote:
> From: Corey Minyard <>
> Recent changes to alloc_pid() allow the pid number to be specified on
> the command line. If set_tid_size is set, then the code scanning the
> levels will hard-set retval to -EPERM, overriding it's previous -ENOMEM
> value.
> After the code scanning the levels, there are error returns that do not
> set retval, assuming it is still set to -ENOMEM.
> So set retval back to -ENOMEM after scanning the levels.
> Fixes: 49cb2fc42ce4 "fork: extend clone3() to support setting a PID"
> Signed-off-by: Corey Minyard <>
> Cc: <> # 5.5
> Cc: Adrian Reber <>
> Cc: Christian Brauner <>
> Cc: Oleg Nesterov <>
> Cc: Dmitry Safonov <>
> Cc: Andrei Vagin <>

Thanks! I've pulled the patch now and applied.

I think that restores the old behavior. If you don't mind, I'll add a
comment on top of it saying something like:
"ENOMEM is not the most obvious choice but it's the what we've been
exposing to userspace for a long time and it's also documented
behavior. So we can't easily change it to something more sensible."

Acked-by: Christian Brauner <>

 \ /
  Last update: 2020-03-07 12:01    [W:0.057 / U:4.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site