diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-03 07:35:23 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-03 07:35:23 +0200 |
commit | e1ec1b8ccdf0df6000faa8c2d985ca5f94157e5a (patch) | |
tree | 4e1ca325dde22f1ac21c9da0be509e87e922e604 /net/rose | |
parent | [NETNS]: Do not include net/net_namespace.h from seq_file.h (diff) | |
parent | [VLAN]: Proc entry is not renamed when vlan device name changes. (diff) | |
download | linux-e1ec1b8ccdf0df6000faa8c2d985ca5f94157e5a.tar.xz linux-e1ec1b8ccdf0df6000faa8c2d985ca5f94157e5a.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/s2io.c
Diffstat (limited to 'net/rose')
-rw-r--r-- | net/rose/af_rose.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 92d85c38e4d2..d1ff3f885c5d 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c @@ -598,17 +598,24 @@ static int rose_release(struct socket *sock) if (sk == NULL) return 0; + sock_hold(sk); + sock_orphan(sk); + lock_sock(sk); rose = rose_sk(sk); switch (rose->state) { case ROSE_STATE_0: + release_sock(sk); rose_disconnect(sk, 0, -1, -1); + lock_sock(sk); rose_destroy_socket(sk); break; case ROSE_STATE_2: rose->neighbour->use--; + release_sock(sk); rose_disconnect(sk, 0, -1, -1); + lock_sock(sk); rose_destroy_socket(sk); break; @@ -633,6 +640,8 @@ static int rose_release(struct socket *sock) } sock->sk = NULL; + release_sock(sk); + sock_put(sk); return 0; } |