]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Fix bug in kernel copy of libfdt's fdt_subnode_offset_namelen()
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 30 Oct 2008 16:37:05 +0000 (16:37 +0000)
committerPaul Mackerras <paulus@samba.org>
Fri, 31 Oct 2008 09:14:19 +0000 (20:14 +1100)
commite31a784866f2db6d50733d145a3ac55e64e1c5a1
treec487b77ce6218a39d84b72539eb6f99021080952
parent9e0a370d4696b4cd2c41806ba9fb8908a5f2aa35
powerpc: Fix bug in kernel copy of libfdt's fdt_subnode_offset_namelen()

There's currently an off-by-one bug in fdt_subnode_offset_namelen()
which causes it to keep searching after it's finished the subnodes of
the given parent, and into the subnodes of siblings of the original
node which come after it in the tree.  This bug was introduced in
commit 7a5f208f6f69feb6f6653131ce7be9bdd8bca388 ("powerpc: Update
in-kernel dtc and libfdt to version 1.2.0").

A patch has already been submitted to dtc/libfdt mainline.  We don't
really want to pull in a new upstream version during the 2.6.28 cycle,
but we should still fix this bug, hence this standalone version of the
fix for the in-kernel libfdt.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/boot/libfdt/fdt_ro.c