]> git.baikalelectronics.ru Git - kernel.git/commit
Fix failure path in alloc_pid()
authorMatthew Wilcox <willy@infradead.org>
Fri, 28 Dec 2018 15:22:26 +0000 (07:22 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 28 Dec 2018 20:42:30 +0000 (12:42 -0800)
commita236cf7afe0369a22f97a3b44262f39bf3ff2cb1
tree95cc3a11b8292c2abeb81fecec48739e2390d087
parent3692308643e81fc57be35d0dc8c354d00953403e
Fix failure path in alloc_pid()

The failure path removes the allocated PIDs from the wrong namespace.
This could lead to us inadvertently reusing PIDs in the leaf namespace
and leaking PIDs in parent namespaces.

Fixes: a282f624fc21 ("pid: replace pid bitmap implementation with IDR API")
Cc: <stable@vger.kernel.org>
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/pid.c