@@ -960,6 +960,15 @@ void sk_free(struct sock *sk)
{
struct sk_filter *filter;
+ if (sk->sk_socket) {
+ printk("AX25_DBG: %p, %p, %u, %u, %u, %p\n", sk, sk->sk_socket,
+ sk->sk_family, sk->sk_type, sk->sk_protocol, sk->sk_socket->sk);
+ if (sk->sk_family == 3 && sk->sk_type == 5 && sk->sk_protocol == 240) {
+ WARN_ON_ONCE(1);
+ sock_orphan(sk);
+ }
+ }
+
if (sk->sk_destruct)
sk->sk_destruct(sk);
net/netrom/af_netrom.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
@@ -525,6 +525,7 @@ static int nr_release(struct socket *sock)
if (sk == NULL) return 0;
sock_hold(sk);
+ sock_orphan(sk);
lock_sock(sk);
nr = nr_sk(sk);
@@ -548,7 +549,6 @@ static int nr_release(struct socket *sock)
sk->sk_state = TCP_CLOSE;
sk->sk_shutdown |= SEND_SHUTDOWN;
sk->sk_state_change(sk);
- sock_orphan(sk);
sock_set_flag(sk, SOCK_DESTROY);
break;