Re: [PATCH v2] of: platform: stop accessing invalid dev in of_platform_device_destroy

2018-06-04 Thread Srinivas Kandagatla
On 04/06/18 14:44, Rob Herring wrote: On Fri, Jun 1, 2018 at 7:03 PM, Srinivas Kandagatla wrote: Immediately after the platform_device_unregister() the device will be cleaned up. Accessing the freed pointer immediately after that will crash the system. Found this bug when kernel is built w

Re: [PATCH v2] of: platform: stop accessing invalid dev in of_platform_device_destroy

2018-06-04 Thread Rob Herring
On Fri, Jun 1, 2018 at 7:03 PM, Srinivas Kandagatla wrote: > Immediately after the platform_device_unregister() the device will be cleaned > up. > Accessing the freed pointer immediately after that will crash the system. > > Found this bug when kernel is built with CONFIG_PAGE_POISONING and testi

[PATCH v2] of: platform: stop accessing invalid dev in of_platform_device_destroy

2018-06-01 Thread Srinivas Kandagatla
Immediately after the platform_device_unregister() the device will be cleaned up. Accessing the freed pointer immediately after that will crash the system. Found this bug when kernel is built with CONFIG_PAGE_POISONING and testing loading/unloading audio drivers in a loop on Qcom platforms. Fix