提交 509b7455 编写于 作者: B Benjamin Herrenschmidt 提交者: Rob Herring

of/fdt: Don't copy garbage after "/" in root node path

The root node path must be internally converted to "/", or various
pieces of code looking for it that way will fail. The code to do
that however had a bug where we might incorrectly append pieces
of the original path from the fdt to the "/".

We should probably add a proper dedicated accessor for the root node
but in the meantime this patch should fix it.
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: NRob Herring <rob.herring@calxeda.com>
上级 20663060
......@@ -186,6 +186,7 @@ static unsigned long unflatten_dt_node(struct boot_param_header *blob,
*/
fpsize = 1;
allocl = 2;
l = 0;
} else {
/* account for '/' and path size minus terminal 0
* already in 'l'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册