From: Ananth N Mavinakayanahalli Date: Fri, 30 Oct 2009 13:53:10 +0000 (+0530) Subject: kprobes: Sanitize struct kretprobe_instance allocations X-Git-Tag: v2.6.33-rc1~400^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4dae560f97fa438f373b53e14b30149c9e44a600;p=pandora-kernel.git kprobes: Sanitize struct kretprobe_instance allocations For as long as kretprobes have existed, we've allocated NR_CPUS instances of kretprobe_instance structures. With the default value of CONFIG_NR_CPUS increasing on certain architectures, we are potentially wasting kernel memory. See http://sourceware.org/bugzilla/show_bug.cgi?id=10839#c3 for more details. Use a saner num_possible_cpus() instead of NR_CPUS for allocation. Signed-off-by: Ananth N Mavinakayanahalli Acked-by: Masami Hiramatsu Cc: Jim Keniston Cc: fweisbec@gmail.com LKML-Reference: <20091030135310.GA22230@in.ibm.com> Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed