)]}'
{
  "commit": "c8a8a75b733467b00c08b91a38dbaf207a08ed6e",
  "tree": "5cb4f6c7fd8d1116aa12f5ca7f7490f9587e8885",
  "parents": [
    "7f2d76c9c03257c0782afef9d95321fa04096f60"
  ],
  "author": {
    "name": "Tristan Madani",
    "email": "tristmd@gmail.com",
    "time": "Tue Jun 02 17:16:41 2026 +0000"
  },
  "committer": {
    "name": "Steffen Klassert",
    "email": "steffen.klassert@secunet.com",
    "time": "Fri Jun 05 13:06:08 2026 +0200"
  },
  "message": "xfrm: iptfs: fix ABBA deadlock in iptfs_destroy_state()\n\niptfs_destroy_state() calls hrtimer_cancel() while holding a spinlock\nthat the timer callback also acquires, leading to an ABBA deadlock on\nSMP systems.\n\nFor the output timer (iptfs_timer):\n  - iptfs_destroy_state() holds x-\u003elock, calls hrtimer_cancel()\n  - iptfs_delay_timer() callback takes x-\u003elock\n\nFor the drop timer (drop_timer):\n  - iptfs_destroy_state() holds drop_lock, calls hrtimer_cancel()\n  - iptfs_drop_timer() callback takes drop_lock\n\nBoth timers use HRTIMER_MODE_REL_SOFT, so their callbacks run in softirq\ncontext.  When hrtimer_cancel() is called for a soft timer that is\ncurrently executing on another CPU, hrtimer_cancel_wait_running() spins\non softirq_expiry_lock -- the same lock held by the softirq running the\ncallback.  If the callback is blocked waiting for the spinlock held by\nthe caller of hrtimer_cancel(), a circular dependency forms:\n\n  CPU 0: holds lock_A -\u003e waits for softirq_expiry_lock\n  CPU 1: holds softirq_expiry_lock -\u003e waits for lock_A\n\nFix by calling hrtimer_cancel() before acquiring the respective locks.\nhrtimer_cancel() is safe to call without holding any lock and will wait\nfor any in-progress callback to complete.  For the output timer, the\nlock is still acquired afterwards to drain the packet queue.  For the\ndrop timer, the lock/unlock pair is removed entirely since it only\nexisted to serialize with the timer callback, which hrtimer_cancel()\nalready guarantees.\n\nFound by source code audit.\n\nFixes: 4b3faf610cc6 (\"xfrm: iptfs: add new iptfs xfrm mode impl\")\nCc: Christian Hopps \u003cchopps@labn.net\u003e\nCc: Steffen Klassert \u003csteffen.klassert@secunet.com\u003e\nCc: stable@vger.kernel.org\nSigned-off-by: Tristan Madani \u003ctristan@talencesecurity.com\u003e\nSigned-off-by: Steffen Klassert \u003csteffen.klassert@secunet.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "aea63a000d1dfcc0cc7e4035d3a4a37d8348e480",
      "old_mode": 33188,
      "old_path": "net/xfrm/xfrm_iptfs.c",
      "new_id": "ad810d1f97c067d0680a1a4a6b7a038997aa206e",
      "new_mode": 33188,
      "new_path": "net/xfrm/xfrm_iptfs.c"
    }
  ]
}
