]> git.baikalelectronics.ru Git - kernel.git/commit
perf, powerpc: Use perf_sample_data_init() for the FSL code
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Fri, 9 Jul 2010 08:21:21 +0000 (10:21 +0200)
committerPaul Mackerras <paulus@samba.org>
Tue, 27 Jul 2010 12:20:09 +0000 (22:20 +1000)
commitd166ee8390c02be9eb4d82aa8293310b7d5f47d6
tree71dea1106bbe0b4cd0a7f8ba18b9a3d47e80c9bf
parent6954e0de3cbee965801a885d82b51a7dbae7a940
perf, powerpc: Use perf_sample_data_init() for the FSL code

We should use perf_sample_data_init() to initialize struct
perf_sample_data.  As explained in the description of commit c3b047fb
("perf: Provide generic perf_sample_data initialization"), it is
possible for userspace to get the kernel to dereference data.raw,
so if it is not initialized, that means that unprivileged userspace
can possibly oops the kernel.  Using perf_sample_data_init makes sure
it gets initialized to NULL.

This conversion should have been included in commit c3b047fb, but it
got missed.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/perf_event_fsl_emb.c