From: Thomas Gleixner Date: Tue, 25 Oct 2011 02:30:50 +0000 (+0000) Subject: net: Unlock sock before calling sk_free() X-Git-Tag: v3.1.1~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2e70d61f72a03751e0b44e4d2630ce5fdf158c4;p=thirdparty%2Fkernel%2Fstable.git net: Unlock sock before calling sk_free() [ Upstream commit b0691c8ee7c28a72748ff32e91b165ec12ae4de6 ] Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/core/sock.c b/net/core/sock.c index bc745d00ea4dd..11d67b36c3260 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1260,6 +1260,7 @@ struct sock *sk_clone(const struct sock *sk, const gfp_t priority) /* It is still raw copy of parent, so invalidate * destructor and make plain sk_free() */ newsk->sk_destruct = NULL; + bh_unlock_sock(newsk); sk_free(newsk); newsk = NULL; goto out;