[PATCH 1/1] perf/amd: NULL return of kzalloc_node should be handled

2014-06-10 Thread Zhouyi Zhou
Signed-off-by: Zhouyi Zhou --- arch/x86/kernel/cpu/perf_event_amd_uncore.c | 32 +++ 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/arch/x86/kernel/cpu/perf_event_amd_uncore.c b/arch/x86/kernel/cpu/perf_event_amd_uncore.c index 3bbdf4c..f60a50e 100644

Re: [PATCH 1/1] perf/amd: NULL return of kzalloc_node should be handled

2014-06-10 Thread Peter Zijlstra
On Tue, Jun 10, 2014 at 04:45:46PM +0800, Zhouyi Zhou wrote: > Thanks Peter for reviewing, and sorry for not think it thoroughly > before submitting. > Is that ok that when amd_uncore_cpu_up_prepare is called from > amd_uncore_cpu_notifier > I return notifier_from_errno(-ENOMEM), and when > amd_un

Re: [PATCH 1/1] perf/amd: NULL return of kzalloc_node should be handled

2014-06-10 Thread Zhouyi Zhou
Thanks Peter for reviewing, and sorry for not think it thoroughly before submitting. Is that ok that when amd_uncore_cpu_up_prepare is called from amd_uncore_cpu_notifier I return notifier_from_errno(-ENOMEM), and when amd_uncore_cpu_up_prepare is called from amd_uncore_init I immediately return

Re: [PATCH 1/1] perf/amd: NULL return of kzalloc_node should be handled

2014-06-10 Thread Peter Zijlstra
On Tue, Jun 10, 2014 at 03:37:38PM +0800, Zhouyi Zhou wrote: Less typing more thinking, this is wrong. You should fail when the allocation fails. pgpdNxyVrn1p_.pgp Description: PGP signature

[PATCH 1/1] perf/amd: NULL return of kzalloc_node should be handled

2014-06-10 Thread Zhouyi Zhou
Signed-off-by: Zhouyi Zhou --- arch/x86/kernel/cpu/perf_event_amd_uncore.c | 32 +++ 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/arch/x86/kernel/cpu/perf_event_amd_uncore.c b/arch/x86/kernel/cpu/perf_event_amd_uncore.c index 3bbdf4c..f60a50e 100644