Re: [PATCH] of/fdt: Improve error checking

2021-03-29 Thread Guenter Roeck
On 3/29/21 11:21 AM, Rob Herring wrote: > On Sat, Mar 27, 2021 at 5:41 PM Guenter Roeck wrote: >> >> If an unaligned pointer is passed to of_fdt_unflatten_tree(), >> populate_node() as called from unflatten_dt_nodes() will fail. >> unflatten_dt_nodes() will return 0 and set *nodepp to NULL. >> Thi

Re: [PATCH] of/fdt: Improve error checking

2021-03-29 Thread Frank Rowand
On 3/29/21 1:21 PM, Rob Herring wrote: > On Sat, Mar 27, 2021 at 5:41 PM Guenter Roeck wrote: >> >> If an unaligned pointer is passed to of_fdt_unflatten_tree(), >> populate_node() as called from unflatten_dt_nodes() will fail. >> unflatten_dt_nodes() will return 0 and set *nodepp to NULL. >> This

Re: [PATCH] of/fdt: Improve error checking

2021-03-29 Thread Rob Herring
On Sat, Mar 27, 2021 at 5:41 PM Guenter Roeck wrote: > > If an unaligned pointer is passed to of_fdt_unflatten_tree(), > populate_node() as called from unflatten_dt_nodes() will fail. > unflatten_dt_nodes() will return 0 and set *nodepp to NULL. > This is not expected to happen in __unflatten_devi

[PATCH] of/fdt: Improve error checking

2021-03-27 Thread Guenter Roeck
If an unaligned pointer is passed to of_fdt_unflatten_tree(), populate_node() as called from unflatten_dt_nodes() will fail. unflatten_dt_nodes() will return 0 and set *nodepp to NULL. This is not expected to happen in __unflatten_device_tree(), which then tries to write into the NULL pointer, caus