diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-03 01:35:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-03 01:35:23 -0400 |
commit | e1ec1b8ccdf0df6000faa8c2d985ca5f94157e5a (patch) | |
tree | 4e1ca325dde22f1ac21c9da0be509e87e922e604 /net/rose | |
parent | c0f39322c335412339dec16ebfd2a05ceba5ebcf (diff) | |
parent | 802fb176d8c635ae42da31b80841c26e8c7338a0 (diff) |
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) | |||
598 | 598 | ||
599 | if (sk == NULL) return 0; | 599 | if (sk == NULL) return 0; |
600 | 600 | ||
601 | sock_hold(sk); | ||
602 | sock_orphan(sk); | ||
603 | lock_sock(sk); | ||
601 | rose = rose_sk(sk); | 604 | rose = rose_sk(sk); |
602 | 605 | ||
603 | switch (rose->state) { | 606 | switch (rose->state) { |
604 | case ROSE_STATE_0: | 607 | case ROSE_STATE_0: |
608 | release_sock(sk); | ||
605 | rose_disconnect(sk, 0, -1, -1); | 609 | rose_disconnect(sk, 0, -1, -1); |
610 | lock_sock(sk); | ||
606 | rose_destroy_socket(sk); | 611 | rose_destroy_socket(sk); |
607 | break; | 612 | break; |
608 | 613 | ||
609 | case ROSE_STATE_2: | 614 | case ROSE_STATE_2: |
610 | rose->neighbour->use--; | 615 | rose->neighbour->use--; |
616 | release_sock(sk); | ||
611 | rose_disconnect(sk, 0, -1, -1); | 617 | rose_disconnect(sk, 0, -1, -1); |
618 | lock_sock(sk); | ||
612 | rose_destroy_socket(sk); | 619 | rose_destroy_socket(sk); |
613 | break; | 620 | break; |
614 | 621 | ||
@@ -633,6 +640,8 @@ static int rose_release(struct socket *sock) | |||
633 | } | 640 | } |
634 | 641 | ||
635 | sock->sk = NULL; | 642 | sock->sk = NULL; |
643 | release_sock(sk); | ||
644 | sock_put(sk); | ||
636 | 645 | ||
637 | return 0; | 646 | return 0; |
638 | } | 647 | } |