Merge "Revert "uevent.c: avoid POLLERR infinite loop"" into main am: ce4e1d99ad
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/2901647 Change-Id: Ic4361d412e481e9c12f41c1c44ce210f6fbbbd4b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
5b2b1c055a
2 changed files with 0 additions and 13 deletions
|
@ -79,7 +79,6 @@ cc_library_shared {
|
||||||
shared_libs: [
|
shared_libs: [
|
||||||
"android.system.suspend-V1-ndk",
|
"android.system.suspend-V1-ndk",
|
||||||
"libdl",
|
"libdl",
|
||||||
"liblog",
|
|
||||||
],
|
],
|
||||||
|
|
||||||
header_libs: [
|
header_libs: [
|
||||||
|
|
12
uevent.c
12
uevent.c
|
@ -16,8 +16,6 @@
|
||||||
|
|
||||||
#include <hardware_legacy/uevent.h>
|
#include <hardware_legacy/uevent.h>
|
||||||
|
|
||||||
#include <log/log.h>
|
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -96,16 +94,6 @@ int uevent_next_event(char* buffer, int buffer_length)
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nr > 0 && (fds.revents & POLLERR)) {
|
|
||||||
int error = 0;
|
|
||||||
socklen_t errlen = sizeof(error);
|
|
||||||
getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &errlen);
|
|
||||||
|
|
||||||
// see b/300009377, this used to be an infinite loop
|
|
||||||
// abort to try to recover
|
|
||||||
LOG_ALWAYS_FATAL("Uevent POLLERR: %s, on FD %d", strerror(error), fd);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// won't get here
|
// won't get here
|
||||||
|
|
Loading…
Reference in a new issue