]> 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)
commit4d4b5318a2bf600950c7ba15c6753aa40d4aeb91
tree95cc3a11b8292c2abeb81fecec48739e2390d087
parentee497cc2fe4e9c093e5129fee3491270133e344f
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: e6f735160050 ("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