[PATCH] ppc64: fix fixup_device_tree

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Jun 1 20:42:40 EST 2005


On Wed, 2005-06-01 at 11:07 +0200, Arnd Bergmann wrote:
> The new fixup_device_tree function breaks on some open firmware
> implementations that can't deal with invalid phandle values passed
> to prom_getprop().
> The current code attempts to check the validity of the phandle
> returned from finddevice but fails to do that correctly, because
> (0x00000000fffffffful <= 0) is false.
> I suggest comparing the returned phandle to the expected
> value directly.

Ah indeed.

There are a couple of other cases that get it wrong btw.

I'll send a patch tomorrow.

Ben.





More information about the Linuxppc64-dev mailing list