Skip to content

Commit 88a944e

Browse files
committed
Revert "ax25: Fix std timer socket destroy handling."
This reverts commit 30902dc. It causes all kinds of problems, based upon a report by Bernard (f6bvp) and analysis by Jarek Poplawski. Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 0523820 commit 88a944e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎net/ax25/ax25_std_timer.c‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ void ax25_std_heartbeat_expiry(ax25_cb *ax25)
3939

4040
switch (ax25->state) {
4141
case AX25_STATE_0:
42-
if (!sk ||
43-
sock_flag(sk, SOCK_DESTROY) ||
44-
sock_flag(sk, SOCK_DEAD)) {
42+
/* Magic here: If we listen() and a new link dies before it
43+
is accepted() it isn't 'dead' so doesn't get removed. */
44+
if (!sk || sock_flag(sk, SOCK_DESTROY) ||
45+
(sk->sk_state == TCP_LISTEN &&
46+
sock_flag(sk, SOCK_DEAD))) {
4547
if (sk) {
4648
sock_hold(sk);
4749
ax25_destroy_socket(ax25);

0 commit comments

Comments
 (0)