Re: [PATCH v2] of: Deep-copy names of platform devices

2014-08-16 Thread Grant Likely
On Fri, Aug 15, 2014 at 5:38 PM, Rob Herring robherri...@gmail.com wrote: Adding Greg... On Tue, Aug 12, 2014 at 9:30 PM, Stepan Moskovchenko step...@codeaurora.org wrote: When we parse the device tree and allocate platform devices, the 'name' of the newly-created platform_device is set to

Re: [PATCH v2] of: Deep-copy names of platform devices

2014-08-15 Thread Rob Herring
Adding Greg... On Tue, Aug 12, 2014 at 9:30 PM, Stepan Moskovchenko step...@codeaurora.org wrote: When we parse the device tree and allocate platform devices, the 'name' of the newly-created platform_device is set to point to the 'name' field of the 'struct device' embedded within the

Re: [PATCH v2] of: Deep-copy names of platform devices

2014-08-15 Thread Greg Kroah-Hartman
On Fri, Aug 15, 2014 at 11:38:33AM -0500, Rob Herring wrote: Adding Greg... On Tue, Aug 12, 2014 at 9:30 PM, Stepan Moskovchenko step...@codeaurora.org wrote: When we parse the device tree and allocate platform devices, the 'name' of the newly-created platform_device is set to point to

[PATCH v2] of: Deep-copy names of platform devices

2014-08-12 Thread Stepan Moskovchenko
When we parse the device tree and allocate platform devices, the 'name' of the newly-created platform_device is set to point to the 'name' field of the 'struct device' embedded within the platform_device. This is dangerous, because the name of the 'struct device' is dynamically allocated. Drivers