Re: [PATCH 1/1] x86: Fix mcheck_init_device() to handlemisc_register() correctly

From: Borislav Petkov
Date: Sat Mar 05 2011 - 07:57:03 EST


On Fri, Mar 04, 2011 at 04:07:21PM -0500, Johan Wessfeldt wrote:
> On Fri, Mar 4, 2011 at 6:16 PM, Borislav Petkov <bp@xxxxxxxxx> wrote:

..

> > Anyway, while this is makes sense from correctness POV, if we hit an
> > error path here this early then something else is going terribly wrong
> > which would've screamed very loudly already. Are you hitting this on a
> > real workload or you caught this by code staring?
> The orginal patch was made with the intention of auditing the code
> according to the kernel-janitors TODO list:
> http://kernelnewbies.org/KernelJanitors/Todo/ReturnCodes .
>
> To clear things up. I originally posted a minor patch, which basically passed
> the return value from misc_register up the stack. See
> http://marc.info/?l=linux-kernel&m=129889198732342&w=2

I see what you're doing and I think it is great that you're trying to
audit the code - this is actually very commendable but I'm questioning
whether such a "fix" makes sense in this case. As I said above, if we
hit those error paths, then we definitely botched up something else big
time and recovering here is pretty moot at this point. Therefore, adding
a bunch of code which is almost never executed is simply unneeded.

HTH.

--
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/