Commit Graph

3 Commits

Author SHA1 Message Date
8d3c3e9756 [kernel] of/device: Fix platform_device.name point to an freed memory after
dev_set_name()

When we use of_device_add() to create platform_device and add it to device
hierarchy, the platform_device.name and device's name will point to the same
memory.

Later we use dev_set_name() to change the device's name, it will alloc new
memory to store name and free old device's name. After it, the
platform_device.name will point to an freed memory, access platform_device.name
 maybe lead to unpredictable exceptions.

So, we alloc new memory for platform_device.name in of_device_add()

Change-Id: I59bf0941ee4e094053971d41d386206e47fddcaa
Signed-off-by: Firefly <service@t-firefly.com>
(cherry picked from commit a51927d3ac36b6f5ec741040d7b694e73f0fbeaf)
2015-12-31 16:42:04 +08:00
3f8870a135 Commit of manifest rk3288_box_lollipop_release.xml 2015-08-11 11:01:11 +08:00
93013a6efc Commit of manifest rk312x_android5.1_rel_v1.02_0423.xml 2015-05-20 17:06:22 +08:00