diff options
| author | Jeroen Vreeken <pe1rxq@amsat.org> | 2003-08-14 07:10:20 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.ninka.net> | 2003-08-14 07:10:20 -0700 |
| commit | 94ca866cc3f31be99fe6317e855a2f3054a04172 (patch) | |
| tree | f670244a1a16f511f9def38819bb1a6afc5d18bb /net/netrom/nr_timer.c | |
| parent | af8a45cb1adc147bc78ebafd9993b588b4f4ffaf (diff) | |
[NETROM]: Lock sockets while doing protocol processing.
Diffstat (limited to 'net/netrom/nr_timer.c')
| -rw-r--r-- | net/netrom/nr_timer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/netrom/nr_timer.c b/net/netrom/nr_timer.c index 2b9271567068..47570b2024d2 100644 --- a/net/netrom/nr_timer.c +++ b/net/netrom/nr_timer.c @@ -143,7 +143,10 @@ static void nr_heartbeat_expiry(unsigned long param) is accepted() it isn't 'dead' so doesn't get removed. */ if (sock_flag(sk, SOCK_DESTROY) || (sk->sk_state == TCP_LISTEN && sock_flag(sk, SOCK_DEAD))) { + sock_hold(sk); nr_destroy_socket(sk); + bh_unlock_sock(sk); + sock_put(sk); return; } break; @@ -227,6 +230,7 @@ static void nr_t1timer_expiry(unsigned long param) case NR_STATE_1: if (nr->n2count == nr->n2) { nr_disconnect(sk, ETIMEDOUT); + bh_unlock_sock(sk); return; } else { nr->n2count++; @@ -237,6 +241,7 @@ static void nr_t1timer_expiry(unsigned long param) case NR_STATE_2: if (nr->n2count == nr->n2) { nr_disconnect(sk, ETIMEDOUT); + bh_unlock_sock(sk); return; } else { nr->n2count++; @@ -247,6 +252,7 @@ static void nr_t1timer_expiry(unsigned long param) case NR_STATE_3: if (nr->n2count == nr->n2) { nr_disconnect(sk, ETIMEDOUT); + bh_unlock_sock(sk); return; } else { nr->n2count++; |
