summaryrefslogtreecommitdiff
path: root/net/x25/x25_timer.c
diff options
context:
space:
mode:
authorShaun Pereira <spereira@tusc.com.au>2006-04-28 12:00:17 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2006-04-29 18:33:11 -0700
commit43dff98b022ded593e73c3784bac03bc9fc7ec55 (patch)
tree93fc4549e1c5d2eee1186916ff8507ce63a99b63 /net/x25/x25_timer.c
parente0a515bc6a2188f02916e976f419a8640312e32a (diff)
[X25]: fix for spinlock recurse and spinlock lockup with timer handler
When the sk_timer function x25_heartbeat_expiry() is called by the kernel in a running/terminating process, spinlock-recursion and spinlock-lockup locks up the kernel. This has happened with testing on some distro's and the patch below fixed it. Signed-off-by: Shaun Pereira <spereira@tusc.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/x25/x25_timer.c')
-rw-r--r--net/x25/x25_timer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/x25/x25_timer.c b/net/x25/x25_timer.c
index 0a92e1da3922..71ff3088f6fe 100644
--- a/net/x25/x25_timer.c
+++ b/net/x25/x25_timer.c
@@ -114,8 +114,9 @@ static void x25_heartbeat_expiry(unsigned long param)
if (sock_flag(sk, SOCK_DESTROY) ||
(sk->sk_state == TCP_LISTEN &&
sock_flag(sk, SOCK_DEAD))) {
+ bh_unlock_sock(sk);
x25_destroy_socket(sk);
- goto unlock;
+ return;
}
break;
@@ -128,7 +129,6 @@ static void x25_heartbeat_expiry(unsigned long param)
}
restart_heartbeat:
x25_start_heartbeat(sk);
-unlock:
bh_unlock_sock(sk);
}