user_apps: fix race condition during initialization
If there is a request to allocate memory before domain 3 has been
inited. then, gdev = hdomain[3].dev
If another thread tries to apps_dev_init domain 2. the device that it
will be used is the one belonging to domain 3.
BUG=b:137202421
TEST=Tested label_image overnight
Change-Id: I40ce9c719287c62bbd88696304f20bb86cd364cc
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: Abhinav Asati <asatiabhi@codeaurora.org>
Reviewed-on: https://chromium-review.googlesource.com/1741750
Tested-by: Julan Hsu <julanhsu@google.com>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Zhihong Yu <zhihongyu@chromium.org>
Reviewed-by: Julan Hsu <julanhsu@google.com>
1 file changed