]> Pileus Git - ~andy/linux/commitdiff
net: Unlock sock before calling sk_free()
authorThomas Gleixner <tglx@linutronix.de>
Tue, 25 Oct 2011 02:30:50 +0000 (02:30 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Oct 2011 23:17:25 +0000 (19:17 -0400)
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock.c

index 5a087626bb3a31f8d2f5deac1d27d685b74cc9cd..4ed7b1d12f5ecde5b8c2119c0d4cfaaa765ff470 100644 (file)
@@ -1257,6 +1257,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;