OSDN Git Service

[DO NOT UPSTREAM] Skip creating subsystem/ in sysfs nodes
authorDaniel Leung <daniel.leung@intel.com>
Thu, 30 Aug 2012 20:06:16 +0000 (13:06 -0700)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Sat, 13 Dec 2014 17:06:39 +0000 (01:06 +0800)
commit3029d921c3c4d0a0f596e45f02afef9190a79abf
treed2bef81e24ed34227be5870a1700de510acf5e74
parentbcd20c1a79e11fcebf65e8900e3fb464480fd1fc
[DO NOT UPSTREAM] Skip creating subsystem/ in sysfs nodes

Some not-so-well-designed Android apps try to recursively read
the sysfs nodes, e.g., cpu information. The subsystem/ node
sometimes is a symlink back to itself, and this causes these
apps to run out of memory iterating all the nodes.

This patch skips the creation of the subsystem nodes if it is
building for Android devices. There should not be any ill-effects
as Android userspace does not look at the subsystem nodes.

Issue: AXIA-629
Change-Id: I748c8b2fde85161e55b006319d46e8e6bbe4eb43
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
drivers/base/bus.c
drivers/base/core.c