From: Daniel Borkmann Date: Tue, 25 Jun 2013 16:17:29 +0000 (+0200) Subject: net: sctp: decouple cleaning some socket data from endpoint X-Git-Tag: v3.11-rc1~64^2~132 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a2fbac197441ebeafbbef09d4bbc0b5e73716d7;p=pandora-kernel.git net: sctp: decouple cleaning some socket data from endpoint Rather instead of having the endpoint clean the garbage from the socket, use a sk_destruct handler sctp_destruct_sock(), that does the job for that when there are no more references on the socket. At least do this for our crypto transform through crypto_free_hash() that is allocated when in listening state. Also, perform sctp_put_port() only when sk is valid. At a later point in time we can still determine if there's an option of placing this into sk_prot->unhash() or sctp_endpoint_free() without any races. For now, leave it in sctp_endpoint_destroy() though. Signed-off-by: Daniel Borkmann Acked-by: Vlad Yasevich Signed-off-by: David S. Miller --- Reading git-diff-tree failed