Re: [PATCH] x86/mce: Improve mcheck_init_device() error handling.

2014-04-28 Thread Borislav Petkov
On Fri, Apr 25, 2014 at 07:40:04PM +0200, Mathieu Souchaud wrote: > Check return code of every function called. > > Signed-off-by: Mathieu Souchaud > --- > arch/x86/kernel/cpu/mcheck/mce.c | 30 +++--- > 1 file changed, 23 insertions(+), 7 deletions(-) > > diff --git

Re: [PATCH] x86/mce: Improve mcheck_init_device() error handling.

2014-04-28 Thread Borislav Petkov
On Fri, Apr 25, 2014 at 07:40:04PM +0200, Mathieu Souchaud wrote: Check return code of every function called. Signed-off-by: Mathieu Souchaud mattieu.souch...@free.fr --- arch/x86/kernel/cpu/mcheck/mce.c | 30 +++--- 1 file changed, 23 insertions(+), 7

Re: [PATCH] x86/mce: Improve mcheck_init_device() error handling.

2014-04-25 Thread mathieu souchaud
In this patch, unwindind is still not perfect from the mce_device_create() calls. I guess, from this point, on error we should call mce_device_remove on every created device. But I think this will make the code rather complex. And I am not too confident on this kind of modification as I don't

[PATCH] x86/mce: Improve mcheck_init_device() error handling.

2014-04-25 Thread Mathieu Souchaud
Check return code of every function called. Signed-off-by: Mathieu Souchaud --- arch/x86/kernel/cpu/mcheck/mce.c | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index

[PATCH] x86/mce: Improve mcheck_init_device() error handling.

2014-04-25 Thread Mathieu Souchaud
Check return code of every function called. Signed-off-by: Mathieu Souchaud mattieu.souch...@free.fr --- arch/x86/kernel/cpu/mcheck/mce.c | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c

Re: [PATCH] x86/mce: Improve mcheck_init_device() error handling.

2014-04-25 Thread mathieu souchaud
In this patch, unwindind is still not perfect from the mce_device_create() calls. I guess, from this point, on error we should call mce_device_remove on every created device. But I think this will make the code rather complex. And I am not too confident on this kind of modification as I don't