nkaje opened a new pull request #2357: URL: https://github.com/apache/mynewt-core/pull/2357
Background: The flash loader application initializes the flash without going through the os_dev APIs and by default OS_SCHEDULING is set to 0. Hence no os initialization is done. If the flash_loader needs to access other flash interfaces such as encrypted flash, that is dependent on os features. Turning OS_SCHEDULING can result in the hal_bsp_init being invoked twice. Once through os_* and then from flash_loader. Though this is should be avoided, in such scenario, it is seen that the global device list gets incorrectly updated with entries pointing to itself as next device, thus creating an infinite loop. Fix: If the device is already present in the global list, calling os_dev_add() can potentially result in an incorrect list. Fix this by checking for the device when the list is traversed. Signed-off-by: Naveen Kaje <[email protected]> ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
