]> err.no Git - linux-2.6/commitdiff
[NETROM]: Drop lock before calling nr_destroy_socket
authorRalf Baechle <ralf@linux-mips.org>
Tue, 11 Jul 2006 03:21:05 +0000 (20:21 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 12 Jul 2006 20:58:45 +0000 (13:58 -0700)
nr_destroy_socket takes the socket lock itself so it should better be
called with the socket unlocked.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netrom/nr_timer.c

index 75b72d389ba95283b4c0f1e9adfc69eb8d3ed2a5..ddba1c144260d4b6adfe1b288c9a68739d551b31 100644 (file)
@@ -138,8 +138,8 @@ static void nr_heartbeat_expiry(unsigned long param)
                if (sock_flag(sk, SOCK_DESTROY) ||
                    (sk->sk_state == TCP_LISTEN && sock_flag(sk, SOCK_DEAD))) {
                        sock_hold(sk);
-                       nr_destroy_socket(sk);
                        bh_unlock_sock(sk);
+                       nr_destroy_socket(sk);
                        sock_put(sk);
                        return;
                }