Files
scoutfs/kmod/src
Auke Kok 4dc694834e Drop pending greetings from resend_queue in set_valid_greeting.
There's a race possible where set_valid_greeting() runs just as
another greeting reply sits on the resend_queue from a handshake:

  1. server_greeting() calls scoutfs_net_response() to queue the
     server's greeting reply on send_queue and kicks send_work.
  2. server_greeting() falls through to scoutfs_net_server_greeting()
     which calls set_valid_greeting() under conn->lock.
  3. If send_work already ran between steps 1 and 2 it moved the
     reply onto resend_queue.
  4. set_valid_greeting() splices resend_queue back into send_queue,
     re-queueing the greeting reply for a second send on the same
     socket.

The receiver treats a duplicate greeting as fatal: the receive path
invalid_message check on the saw_greeting flag tears the connection
down silently. The client never sees a normal disconnect, just a
stalled connection, and the server only notices once the 30s
recovery timeout fires and fences the client.

Fix by walking resend_queue in set_valid_greeting() and dropping any
queued greeting before splicing them in. Dropping them should be safe
and mimics what scoutfs_net_shutdown_worker() does.

Signed-off-by: Auke Kok <auke.kok@versity.com>
2026-08-13 13:54:54 -04:00
..
2024-06-28 15:09:05 -07:00
2024-06-28 15:09:05 -07:00
2024-06-28 14:53:49 -07:00
2020-08-26 14:39:12 -07:00
2026-06-05 09:49:45 -07:00
2022-12-12 14:59:22 -08:00
2024-01-25 11:30:17 -08:00
2025-10-24 14:21:06 -04:00
2018-04-04 09:15:27 -05:00
2017-12-20 12:21:13 -08:00
2026-07-27 15:03:51 -05:00
2026-06-08 11:53:16 -07:00
2023-06-14 14:12:10 -07:00
2018-01-26 11:59:47 -08:00
2021-08-24 09:11:40 -07:00
2021-08-24 09:11:40 -07:00
2026-07-27 15:03:51 -05:00
2020-10-29 14:15:33 -07:00
2026-07-27 15:03:51 -05:00
2026-07-27 15:03:51 -05:00
2026-07-27 15:03:51 -05:00
2026-07-27 15:03:51 -05:00
2026-07-27 15:03:51 -05:00
2026-06-05 09:49:45 -07:00
2024-06-28 14:53:49 -07:00
2024-10-03 12:41:05 -07:00
2024-06-28 15:09:05 -07:00
2019-08-20 15:52:13 -07:00
2025-11-13 12:43:31 -08:00
2022-03-11 15:28:58 -08:00
2019-05-21 11:33:26 -07:00
2019-05-21 11:33:26 -07:00
2022-12-12 14:59:22 -08:00
2024-06-28 15:09:05 -07:00
2020-10-29 14:15:33 -07:00
2020-10-29 14:15:33 -07:00
2020-11-30 13:35:44 -08:00
2019-04-12 10:54:07 -07:00
2024-10-03 12:41:05 -07:00
2026-04-10 13:50:21 -07:00
2026-04-10 13:50:21 -07:00
2026-07-27 15:03:51 -05:00
2021-07-07 14:13:14 -07:00
2018-07-27 09:50:21 -07:00
2024-06-28 15:09:05 -07:00
2024-06-28 15:09:05 -07:00