No description
Find a file
Tom Cherry bea663d04c init: poll in first stage mount if required devices are not found
First stage mount in init currently attempts to regenerate uevents for
specific devices to create the corresponding dev nodes.  However, this
is racy as first stage mount happens early in the boot process and
it's possible that some of these devices have not yet been created by
the kernel.

To fix this issue, init will poll on the uevent socket for up to 10
seconds waiting for the kernel to create the required device.  It will
return false and panic if this 10 second timeout passes.

Note that the same uevent socket is used in the uevent regeneration
and the polling code, so there is no race if the device is created
after the uevent regeneration and before polling starts; the first
poll will pick up the device.

Bug: 62681642
Bug: 62682821
Test: Boot bullhead
Test: Boot sailfish
Test: Boot hikey + hotplug/unplug sdcard
Merged-In: I4a6ff043eb7115b729ca4954ebc6c9e000132993
Change-Id: I4a6ff043eb7115b729ca4954ebc6c9e000132993
(cherry picked from commit c4ff5e803917f04574fe98f846875db77d0fd8f5)
2017-06-20 14:26:44 -07:00
adb adb: fix deadlock between transport_unref and usb_close. 2017-06-19 11:17:44 -07:00
adf libadfhwc: Fix adf_hwc_close 2017-03-02 17:40:16 +00:00
base logging: make LOG(FATAL) always run with the static analyzer. 2017-05-31 14:41:22 +00:00
bootstat bootstat: Log factory_reset_boot_complete separately from ota_*. 2017-05-30 15:03:15 -07:00
cpio Possible null pointer miss on realloc 2017-03-23 22:41:14 +01:00
debuggerd tombstoned: log where we're writing the tombstone. 2017-06-12 23:41:45 -07:00
demangle Fix handling of _ZLXX. 2017-06-01 17:37:09 -07:00
fastboot fastboot: use filename instead of fd to generate filesystem image 2017-05-31 21:23:12 +00:00
fs_mgr first stage mount: removing the restriction of mount points 2017-06-09 12:47:17 +08:00
gatekeeperd Credential FRP: keep gatekeeperd credentials after reset 2017-04-18 20:50:52 +00:00
healthd Merge "healthd: Implement scheduleUpdate" am: 6edabc75ab am: c0405200b8 2017-03-23 01:12:17 +00:00
include Load vendor public libraries to sphal namespace 2017-05-25 10:30:55 -07:00
init init: poll in first stage mount if required devices are not found 2017-06-20 14:26:44 -07:00
libappfuse Add more logs for writing failures. 2017-06-12 10:37:08 +09:00
libbacktrace Use demangle for function names. 2017-06-02 10:10:24 -07:00
libbinderwrapper libbinderwrapper: Android.mk -> Android.bp 2017-04-25 15:55:26 -07:00
libcrypto_utils Add vendor_available:true to libcrypto_utils 2017-05-16 11:51:09 -07:00
libcutils Revert "Revert "Load default prop from /system/etc/prop.default"" 2017-06-13 21:22:06 +08:00
libdiskconfig Mark libdiskconfig vendor_available. 2017-05-31 01:54:31 +00:00
libgrallocusage Mark libgrallocusage as vendor_available 2017-05-04 12:25:43 +09:00
libion Mark libion vendor_available. 2017-05-31 01:56:38 +00:00
libkeyutils Add libkeyutils. 2017-05-10 14:53:28 -07:00
liblog add component metadata tag to CTS liblog test acses 2017-06-06 19:28:39 +00:00
libmemtrack libmemtrack: check return value for getMemory() 2017-02-27 12:21:39 -08:00
libmemunreachable Add a helpful error message if GetUnreachableMemory fails 2017-06-15 13:15:09 -07:00
libmetricslogger Mark libmetricslogger vendor_available. 2017-05-31 01:52:59 +00:00
libnativebridge Load vendor public libraries to sphal namespace 2017-05-25 10:30:55 -07:00
libnativeloader Load vendor public libraries to sphal namespace 2017-05-25 10:30:55 -07:00
libnetutils Mark libnetutils vendor_available. 2017-05-31 02:02:17 +00:00
libpackagelistparser liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
libpixelflinger liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
libprocessgroup init: move killing of process groups to libprocessgroup 2017-06-15 10:21:05 -07:00
libprocinfo Mark libprocinfo vendor_avaialable. 2017-05-31 01:52:14 +00:00
libsparse Merge "libsparse: Fix odd-sized input files total_blks" am: 652ce94f40 am: ab74c778df 2017-04-19 19:26:27 +00:00
libsuspend Mark libsuspend vendor_available. 2017-05-31 01:51:00 +00:00
libsync libsync: ndk: Fix compilation in C mode. 2017-04-14 15:12:06 -07:00
libsystem fix circular dependency libnativewindow <-> libui 2017-05-09 15:15:50 -07:00
libsysutils Mark libsysutils vendor_available. 2017-05-31 01:59:42 +00:00
libunwindstack Change RegsTmpl to RegsImpl. 2017-06-01 17:56:46 -07:00
libusbhost Merge "Convert libusbhost to Android.bp" am: a58c4b5bcd am: dff208c80c 2017-04-20 17:24:57 +00:00
libutils Merge "fix: ATRACE does not work for libs loaded in sphal namespace" into oc-dev 2017-05-31 00:36:15 +00:00
libvndksupport Merge "libvndksupport: Do not lookup default namespace for sphal failure" into oc-dev 2017-05-31 07:01:41 +00:00
libziparchive Mark libziparchive vendor_available. 2017-05-31 01:58:06 +00:00
lmkd lmkd: Android.mk -> Android.bp 2017-04-28 15:20:18 -07:00
logcat logcat: logcatd: make logcatd killable 2017-05-31 11:27:22 -07:00
logd add component metadata tag to CTS liblog test acses 2017-06-05 23:17:50 +00:00
logwrapper Merge "logwrapper: add a benchmark for android_fork_execvp_ext" 2017-03-23 11:56:10 +00:00
mkbootimg mkbootimg: use int for os_version and os_patch_level 2016-03-29 16:06:37 -07:00
qemu_pipe Mark libqemu_pipe vendor_available 2017-06-08 14:16:11 -07:00
reboot Convert more Android.mk files to Android.bp 2016-07-13 17:41:45 -07:00
rootdir Don't allow libui.so to RS drivers. 2017-06-09 17:38:28 +09:00
run-as Define range of GIDs for cached app data. 2016-12-13 13:28:08 -07:00
sdcard Make sdcardfs the default 2017-03-20 13:11:10 -07:00
shell_and_utilities Add building and installing of grep for vendor. 2017-06-19 13:12:37 -07:00
storaged storaged: stop binder threads before exiting 2017-04-04 19:44:01 +00:00
toolbox Add building and installing of grep for vendor. 2017-06-19 13:12:37 -07:00
trusty trusty*: Android.mk -> Android.bp 2017-05-08 16:54:04 +00:00
tzdatacheck Update to support staging behavior 2017-03-31 17:41:56 +01:00
.clang-format Add a 2 width option of clang format. 2017-03-10 13:01:39 -08:00
.clang-format-2 Only allow short functions in class definitions. 2017-03-28 12:31:37 -07:00
.clang-format-4 Only allow short functions in class definitions. 2017-03-28 12:31:37 -07:00
.gitignore Ignore adb/*.pyc files 2015-08-11 12:59:58 -07:00
Android.bp Export android_filesystem_config.h as a filegroup 2017-01-17 18:20:28 -08:00
Android.mk Remove the simulator target from all makefiles. 2011-07-11 22:12:32 -07:00
CleanSpec.mk init.rc: have hwservicemanager start the HAL class 2016-09-26 00:23:51 -07:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
NOTICE Fix omission in NOTICE file. 2013-07-30 13:56:55 -07:00
platform_tools_tool_version.mk Fix warning on the build servers 2017-05-25 12:35:40 -07:00
PREUPLOAD.cfg Add a PREUPLOAD.cfg file to run git-clang-format on every commit 2017-03-08 16:51:26 +08:00