Go to file
Tom Cherry d43b615216 ueventd: remove PlatformDeviceList
In order to create symlinks for USB and block devices, the path for
their parent platform device must be known.

Previously, ueventd would save each platform device that it encounters
to a list and query this list when creating the symlinks.  That,
however, is racy because the uevent socket does not differentiate
uevents from device_init() and uevents sent by the kernel when
probing a device first the first time.  The below scenario is the
faulty case:

1) Kernel probes parent platform device for a block device
2) ueventd calls device_init() and starts processing uevents
3) Kernel probes block device and sends its uevents
4) ueventd picks up the block device uevent during its uevent processing,
   without yet regenerating the platform device uevent, causing improper
   symlinks to be created.

This change stops storing the platform devices in a list, and instead
traverses up the directory structure for each USB or block device
until it reaches a platform device, defined as one whose subsystem is
the platform bus.  This fixes the race and simplifies the ueventd
code.

Bug: 62436493
Bug: 62681642
Test: Boot bullhead
Test: Boot sailfish
Test: Boot hikey + hotplug/unplug sdcard
Merged-In: I21636355d8e434f30e0cba568598a6cf139e67f9
Change-Id: I21636355d8e434f30e0cba568598a6cf139e67f9
2017-06-20 21:22:00 +00:00
adb Always print the initial bugreport progress message. 2017-05-23 19:01:18 -07:00
adf libadfhwc: Fix adf_hwc_close 2017-03-02 17:40:16 +00:00
base libbase: fix build breakage 2017-04-14 11:23:36 -07:00
bootstat bootstat: Report the total bootloader time. 2017-02-16 11:53:03 -08: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 21:02:02 +00:00
demangle Use the clang format 2 space as default. 2017-03-14 13:06:19 -07:00
fastboot Move "fastboot oem" to std::string. 2017-03-15 09:40:28 -07:00
fs_mgr Respect that status property when parsing fstab from device tree 2017-05-26 18:09:06 -07:00
gatekeeperd gatekeeper HAL uses "default" service name 2017-02-23 19:31:59 +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-24 11:02:31 -07:00
init ueventd: remove PlatformDeviceList 2017-06-20 21:22:00 +00:00
libappfuse Merge "Change the CHECK failure into function failure." into oc-dev 2017-05-17 03:22:27 +00:00
libbacktrace Merge "libbacktrace: make vendor_available" into oc-dev 2017-04-14 17:59:29 +00:00
libbinderwrapper Convert libbinderwrapper_test_support to be a static library 2017-03-03 17:14:04 -08: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 libgrallocusage: use gralloc1.h usage flags 2017-04-10 09:47:34 -07:00
libion Mark libion vendor_available. 2017-05-31 01:56:38 +00:00
liblog add component metadata tag to CTS liblog test acses 2017-06-05 23:21:23 +00:00
libmemtrack libmemtrack: check return value for getMemory() 2017-02-27 12:21:39 -08:00
libmemunreachable Add vendor_available:true to libmemunreachable 2017-05-31 01:48:40 +00:00
libmetricslogger Mark libmetricslogger vendor_available. 2017-05-31 01:52:59 +00:00
libnativebridge Load vendor public libraries to sphal namespace 2017-05-24 11:02:31 -07:00
libnativeloader Load vendor public libraries to sphal namespace 2017-05-24 11:02:31 -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 add killProcessGroupOnce 2017-03-30 14:17:09 -07:00
libprocinfo Mark libprocinfo vendor_avaialable. 2017-05-31 01:52:14 +00:00
libsparse Remove "_host" and "_static" suffix from libsparse definition. am: b0c395955d am: 7b8d66e7cc am: 11b65cf3be 2017-01-12 22:45:52 +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 Add NATIVE_WINDOW_CONSUMER_IS_PROTECTED enum 2017-05-01 16:41:26 -07:00
libsysutils Mark libsysutils vendor_available. 2017-05-31 01:59:42 +00:00
libunwindstack Use the 2 space clang format for libunwindstack. 2017-03-21 10:41:45 -07:00
libusbhost Merge "usblib: Wrap USBDEVFS_REAPURBNDELAY ioctl" 2016-10-27 16:15:12 +00:00
libutils fix: ATRACE does not work for libs loaded in sphal namespace 2017-05-27 15:32:01 +09: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 liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
logcat logcatd: introduce logcatd executable 2017-04-05 19:35:07 +00:00
logd logd: instrument tests better for failure 2017-04-18 07:25:27 -07: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
reboot Convert more Android.mk files to Android.bp 2016-07-13 17:41:45 -07:00
rootdir Add libion.so to vndk-sp 2017-06-07 18:13:32 +08: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 shell_and_utils: add vendor shell and toybox targets 2017-05-23 12:58:47 -07:00
storaged storaged: stop binder threads before exiting 2017-04-04 19:44:01 +00:00
toolbox Revert "Only allow system to write to existing input nodes." 2017-02-21 17:12:59 +00:00
trusty trusty: use log/log.h for ALOG macros 2017-01-13 07:30:11 -08: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 Remove extraneous .clang-format files 2017-03-14 14:06:31 -07:00
.clang-format-4 Remove extraneous .clang-format files 2017-03-14 14:06:31 -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
PREUPLOAD.cfg Add a PREUPLOAD.cfg file to run git-clang-format on every commit 2017-03-08 16:51:26 +08:00