logo       

[PATCH] bluetooth - set sock owner: msg#00956

Subject: [PATCH] bluetooth - set sock owner
All sockets created by a protocol need to have owner field set
to prevent problems with orphaned sockets during module unload.

diff -Nru a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
--- a/net/bluetooth/af_bluetooth.c      Fri Aug 29 11:14:03 2003
+++ b/net/bluetooth/af_bluetooth.c      Fri Aug 29 11:14:03 2003
@@ -130,6 +130,7 @@
        }
 
        sock_init_data(sock, sk);
+       sk_set_owner(sk, THIS_MODULE);
        INIT_LIST_HEAD(&bt_sk(sk)->accept_q);
        
        sk->sk_zapped   = 0;




<Prev in Thread] Current Thread [Next in Thread>