diff options
author | Cyrill Gorcunov <gorcunov@openvz.org> | 2012-10-19 22:56:53 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-19 23:07:47 +0200 |
commit | bbc2e3ef87851bc5430b2b4cf4ca3a2f29baeda6 (patch) | |
tree | d9cef396c8370184f23e99480725aa8fde4bea08 /kernel/latencytop.c | |
parent | drivers/video/backlight/lm3639_bl.c: return proper error in lm3639_bled_mode_... (diff) | |
download | linux-bbc2e3ef87851bc5430b2b4cf4ca3a2f29baeda6.tar.xz linux-bbc2e3ef87851bc5430b2b4cf4ca3a2f29baeda6.zip |
pidns: remove recursion from free_pid_ns()
free_pid_ns() operates in a recursive fashion:
free_pid_ns(parent)
put_pid_ns(parent)
kref_put(&ns->kref, free_pid_ns);
free_pid_ns
thus if there was a huge nesting of namespaces the userspace may trigger
avalanche calling of free_pid_ns leading to kernel stack exhausting and a
panic eventually.
This patch turns the recursion into an iterative loop.
Based on a patch by Andrew Vagin.
[akpm@linux-foundation.org: export put_pid_ns() to modules]
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Andrew Vagin <avagin@openvz.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/latencytop.c')
0 files changed, 0 insertions, 0 deletions