From: Chris Wright Date: Fri, 1 Jun 2007 07:46:39 +0000 (-0700) Subject: x86: fix oprofile double free X-Git-Tag: v2.6.22-rc4~48 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0939c17c7bcf1c838bea4445b80a6966809a438f;p=pandora-kernel.git x86: fix oprofile double free Chuck reports that the recent fix from Andi to oprofile 6c977aad03a18019015035958c65b6729cd0574c introduces a double free. Each cpu's cpu_msrs is setup to point to cpu 0's, which causes free_msrs to free cpu 0's pointers for_each_possible_cpu. Rather than copy the pointers, do a deep copy instead. [acme@redhat.com: allocate_msrs() was using for_each_online_cpu()] Signed-off-by: Chris Wright Cc: Andi Kleen Cc: Alan Cox Cc: Dave Jones Cc: Chuck Ebbert Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed