unflatten_dt_node allocl is out by one?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




G'day,

OLPC XO-4 on 3.16-rc4 was not resolving aliases.

of_alias_get_id was returning -ENODEV, because of_alias_scan was not
finding an /aliases node.

unflatten_device_tree did process an /aliases node.

But the name of the aliases node was missing a terminating NUL,
because in unflatten_dt_node the node allocation length was off by
one, in turn because the length was set from a post-decrement:

        allocl = l++;

And is solved by pre-decrement:

        allocl = ++l;

The triggering change may have been from "of/fdt: Convert FDT
functions to use libfdt" e6a6928c3ea1d0195ed75a091e345696b916c09b.

It is also quite possible that I misunderstand something, and welcome
any correction.

-- 
James Cameron
http://quozl.linux.org.au/
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux