aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorPaul Menage <menage@google.com>2008-10-18 20:28:04 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-20 08:52:38 -0700
commitcc31edceee04a7b87f2be48f9489ebb72d264844 (patch)
tree5d37791218c420281e509899645d89aee7902f2b /security
parent146aa1bd0511f88ddb4e92fafa2b8aad4f2f65f3 (diff)
cgroups: convert tasks file to use a seq_file with shared pid array
Rather than pre-generating the entire text for the "tasks" file each time the file is opened, we instead just generate/update the array of process ids and use a seq_file to report these to userspace. All open file handles on the same "tasks" file can share a pid array, which may be updated any time that no thread is actively reading the array. By sharing the array, the potential for userspace to DoS the system by opening many handles on the same "tasks" file is removed. [Based on a patch by Lai Jiangshan, extended to use seq_file] Signed-off-by: Paul Menage <menage@google.com> Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: Serge Hallyn <serue@us.ibm.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions