diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-02 22:35:23 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-02 22:35:23 -0700 |
commit | e1ec1b8ccdf0df6000faa8c2d985ca5f94157e5a (patch) | |
tree | 4e1ca325dde22f1ac21c9da0be509e87e922e604 /net/rose | |
parent | c0f39322c335412339dec16ebfd2a05ceba5ebcf (diff) | |
parent | 802fb176d8c635ae42da31b80841c26e8c7338a0 (diff) | |
download | linux-stable-e1ec1b8ccdf0df6000faa8c2d985ca5f94157e5a.tar.gz linux-stable-e1ec1b8ccdf0df6000faa8c2d985ca5f94157e5a.tar.bz2 linux-stable-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; } |