Here is a an updated version. The external behaviour of this patchset is the same as v4; for more details, see that cover letter at http://www.spinics.net/lists/netdev/msg354303.html .
This version fixes two bugs spotted by Eric, and implements Tom's suggestion of making the socket destroy code a per-protocol function pointer so that in-kernel callers can use it. The resulting code is a bit longer but a bit more generic, and exposes fewer TCP implementation details. The operation is still called SOCK_DESTROY, but given that its main implementation is the TCP ABORT operation, and that the word "destroy" is used in the inet_csk code to refer to freeing a socket, and in the inet_diag code to refer to broadcasts about sockets being freed, perhaps it could be renamed to SOCK_ABORT. Tested using net_test. Tests check that TCP resets are sent in the right states, that accept(), read() and connect() are interrupted, that closing sockets makes the socket unusable, and that destroying non-TCP sockets returns EOPNOTSUPP. Tests at https://android-review.googlesource.com/#/c/187491/ . -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html