This resolves a problem with ioctl(NIOCGETHSTAT) hanging forever as identified by Erik van der Kouwe, and possibly many other corner cases. Change-Id: I2350c882dc6a0862e16454ec6b6c320d78780bcd