Skip to content

Commit

Permalink
[X25]: fix for spinlock recurse and spinlock lockup with timer handler
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shaun Pereira authored and David S. Miller committed Apr 30, 2006
1 parent e0a515b commit 43dff98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/x25/x25_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -128,7 +129,6 @@ static void x25_heartbeat_expiry(unsigned long param)
}
restart_heartbeat:
x25_start_heartbeat(sk);
unlock:
bh_unlock_sock(sk);
}

Expand Down

0 comments on commit 43dff98

Please sign in to comment.