diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-08-01 17:34:01 (GMT) |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-08-01 17:34:01 (GMT) |
commit | 9454c23852ca6d7aec89fd6fd46a046c323caac3 (patch) | |
tree | 794be65345027b5adea3720a43124fee338333a5 /net/ax25/ax25_ds_timer.c | |
parent | a04bee8285a71cdbb9076c3dc38be1f0b9a6b4b3 (diff) | |
parent | 4ef33685aa0957d771e068b60a5f3ca6b47ade1c (diff) | |
download | linux-9454c23852ca6d7aec89fd6fd46a046c323caac3.tar.xz |
Merge branch 'pci/msi-affinity' into next
Conflicts:
drivers/nvme/host/pci.c
Diffstat (limited to 'net/ax25/ax25_ds_timer.c')
-rw-r--r-- | net/ax25/ax25_ds_timer.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ax25/ax25_ds_timer.c b/net/ax25/ax25_ds_timer.c index 951cd57..5237dff 100644 --- a/net/ax25/ax25_ds_timer.c +++ b/net/ax25/ax25_ds_timer.c @@ -102,6 +102,7 @@ void ax25_ds_heartbeat_expiry(ax25_cb *ax25) switch (ax25->state) { case AX25_STATE_0: + case AX25_STATE_2: /* Magic here: If we listen() and a new link dies before it is accepted() it isn't 'dead' so doesn't get removed. */ if (!sk || sock_flag(sk, SOCK_DESTROY) || @@ -111,6 +112,7 @@ void ax25_ds_heartbeat_expiry(ax25_cb *ax25) sock_hold(sk); ax25_destroy_socket(ax25); bh_unlock_sock(sk); + /* Ungrab socket and destroy it */ sock_put(sk); } else ax25_destroy_socket(ax25); @@ -213,7 +215,8 @@ void ax25_ds_t1_timeout(ax25_cb *ax25) case AX25_STATE_2: if (ax25->n2count == ax25->n2) { ax25_send_control(ax25, AX25_DISC, AX25_POLLON, AX25_COMMAND); - ax25_disconnect(ax25, ETIMEDOUT); + if (!sock_flag(ax25->sk, SOCK_DESTROY)) + ax25_disconnect(ax25, ETIMEDOUT); return; } else { ax25->n2count++; |