summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorVictor Chang <vichang@google.com>2017-10-18 16:49:33 +0100
committerVictor Chang <vichang@google.com>2017-10-24 15:28:53 +0100
commit8f133afd09028a9541b7c05e21886756c0391c7e (patch)
treec9a25020c0fd35271963c6d3b79f08538980cae4 /annotations/generate_annotated_java_files.py
parent46f9425237f413bd1a46e9b64e423748bcc69c6e (diff)
Revert "FileDispatcherImpl: Untag sockets before preClose."
This reverts commit 9666717e56a67817561d77b703f65dea286f55f6. Previously, xt_qtaguid never freed tags when the socket was closed, so if we didn't untag sockets in userspace it would leak memory. See for example b/5274621. That was fixed by the change in b/36374484, so this code is no longer necessary. Behavior change - Automatically untagging sockets on close() is incorrect, because close() does not close the socket, only the filedescriptor, which might be only one of the references to the socket. Thus, socket(); dup(); close results in the socket being untagged, even if the dupd socket is still open. - Additionally, untagging sockets automatically has undesirable side-effects. For example, it makes it very difficult for a process to create and tag a socket, and pass that socket to an app, without losing the tag. Workaround to keep old behavior If an app needs to keep old behavior, the app should call TrafficStats.untagSocket to remove the tag before sending it to another process. Test: CtsLibcoreTestCases Bug: 67425668 Change-Id: I0b0101b5ebc241741d6da707e67cae3f1d5805e8
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions