)]}'
{
  "commit": "7f1c51dce304a19ea03580f4ddcb5c2b3c0229bc",
  "tree": "bbaf242beadcdf24630a4a01abf236e413c571f5",
  "parents": [
    "308bf0d44e1d9e3d28c668f30f81f985c30612ee"
  ],
  "author": {
    "name": "Chris Mason",
    "email": "mason@kernel.org",
    "time": "Mon Nov 23 14:24:53 2026 +0100"
  },
  "committer": {
    "name": "Paolo Abeni",
    "email": "pabeni@redhat.com",
    "time": "Tue Dec 01 10:12:34 2026 +0100"
  },
  "message": "mptcp: leave an orphan\u0027s DATA_FIN to the worker\n\nClosed MPTCP sockets can leak until reboot, with the data in their\nreceive queues, which can exhaust tcp_mem and stall other TCP\nconnections.\n\nOnce close() has returned, only mptcp_worker() destroys an orphaned msk,\nand only in the run that moves it to TCP_CLOSE: a later run returns at\nonce, and mptcp_schedule_work() queues no work for an msk in that state.\nThe receive path, in softirq, puts data on the backlog while the msk is\nowned, and release_sock() calls mptcp_release_cb(), which passes the\nbacklog to __mptcp_move_skbs(). But __mptcp_move_skbs() calls\nmptcp_check_data_fin(), which can move the msk to TCP_CLOSE, and by then\nthe lock owner, here the worker, no longer looks at the state:\n\n    receive path, softirq             mptcp_worker()\n    \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d             \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n                                      not in TCP_CLOSE: no destroy\n    last data, with the DATA_FIN\n      the msk is owned: backlog\n                                      release_sock()\n                                        mptcp_release_cb()\n                                          __mptcp_move_skbs()\n                                            mptcp_check_data_fin()\n                                              TCP_CLOSE, never destroyed\n\nThe fix used here is to queue the worker in __mptcp_move_skbs() if an\norphaned msk has a DATA_FIN to handle, instead of calling\nmptcp_check_data_fin().\n\nThis issue has been found with the help of an LLM, and reproduced in a\nVM, with the reproducer shared with the original version of this patch:\n200,000 connections in which the server accept()s and close()s, while\nthe client reads the end of file, sends one byte, and closes. Without\nthis patch, some MPTCP sockets of the server stayed in the CLOSE state\nfor good, with their network namespace:\n\n  \u003d\u003d\u003d connections so far : MPTCP sockets of the server in the state CLOSE: 200000:722,\n  [...]\n  RESULT [...] | left 300 s behind the end: slab_MPTCP\u003d722 sockets_MPTCP\u003d722 [...]\n  [...] | veth_end_left\u003d1 slab_net_namespace_left\u003d2 | [...]\n\nFixes: bc68b0efa1bf (\"mptcp: move the whole rx path under msk socket lock protection\")\nCc: stable@vger.kernel.org\nSigned-off-by: Chris Mason \u003cmason@kernel.org\u003e\n[ Shorter comment. Commit message: how the issue was found, and its\n  symptoms. ]\nSigned-off-by: Matthieu Baerts (NGI0) \u003cmatttbe@kernel.org\u003e\nLink: https://patch.msgid.link/20261123-net-mptcp-misc-fixes-7-4-rc5-v1-5-278042217e8d@kernel.org\nSigned-off-by: Paolo Abeni \u003cpabeni@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a700eb6982645c8f624798a91e612968b36b49cb",
      "old_mode": 33188,
      "old_path": "net/mptcp/protocol.c",
      "new_id": "1431e56b9274d3596ab1efc6b23c1b6496ed9e89",
      "new_mode": 33188,
      "new_path": "net/mptcp/protocol.c"
    }
  ]
}
