add tls cleanup toprotect udp
Summary
Due to abnormal application exit,so add tls cleanup to protect udp process
Impact
udp
Testing
Manual verification
@xiaoxiang781216 The life cycle of the socket should be managed with file descriptor. If an abnormal exit causes an exception, then the VFS needs to be further enhanced. If all subsystems depends on TLS when exiting, then the entire kernel will be surrounded by TLS. The implementation of the protocol stack should further learn from the Linux kernel instead of applying these ugly patches!
If similar changes are allowed, in the future any waiting logic in the subsystem will need to depends on tls_cleanup_push/tls_cleanup_pop, Is this what you expect?
@xiaoxiang781216 The life cycle of the socket should be managed with file descriptor. If an abnormal exit causes an exception, then the VFS needs to be further enhanced. If all subsystems depends on TLS when exiting, then the entire kernel will be surrounded by TLS. The implementation of the protocol stack should further learn from the Linux kernel instead of applying these ugly patches!
@anchao Agree, and maybe we'll not merge this PR into the master. BTW, is CONFIG_CANCELLATION_POINTS well tested? Socket operations are already protected by cancellation points, but we haven't enabled it on products yet.