init: prevent waiting forever when a setprop is incomplete.
Any app can socket_local_client_connect(s, "property_service", ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM) and just keep it open without sending anything. From then on, the property_service.c::handle_property_set_fd() will just recv() forever. This prevents any other properties (i.e. property_set("sys.powerctl", "reboot")) from being processed. Now, we just poll() for 2 sec before recv(...,MSG_DONTWAIT). Bug: 12061560 Change-Id: Iffea4ebb444c7100b59c43ed87aecc5c99f9d3e8
Loading
Please register or sign in to comment