[PATCH 1/2] pseries: device node status can be "ok" or "okay"
Segher Boessenkool
segher at kernel.crashing.org
Sat Aug 11 04:06:34 EST 2007
> It seems that some versions of firmware will report a device
> node status as the string "okay". As we are not expecting this
> string, the device node will be ignored by the EEH subsystem.
> Which means EEH will not be enabled.
>
> When EEH is not enabled, PCI errors will be converted into
> Machine Check exceptions, and we'll have a very unhappy system.
> - if (status && strcmp(status, "ok") != 0)
> + if (status && strncmp(status, "ok", 2) != 0)
> return NULL; /* ignore devices with bad status */
Shouldn't you check for the two literal strings, instead of
only matching the common prefix? Seems safer.
Segher
More information about the Linuxppc-dev
mailing list