)]}'
{
  "commit": "ba36786b21d19082e696eda85bfcd49e7071944a",
  "tree": "4c7fb38d4903c3cc758fac88447962d09b14ecb2",
  "parents": [
    "e4aaac46593733a06ec1a1f1a63128206d67fcaa"
  ],
  "author": {
    "name": "Wentao Liang",
    "email": "vulab@iscas.ac.cn",
    "time": "Wed Jun 10 10:27:05 2026 -0700"
  },
  "committer": {
    "name": "Matthew Brost",
    "email": "matthew.brost@intel.com",
    "time": "Thu Jun 11 06:39:40 2026 -0700"
  },
  "message": "drm/xe: fix refcount leak in xe_range_fence_insert()\n\nxe_range_fence_insert() acquires a reference on fence via\ndma_fence_get() and stores it in rfence-\u003efence.  It then calls\ndma_fence_add_callback() and handles two cases: when the callback\nis successfully registered (err \u003d\u003d 0) the fence is transferred to\nthe tree for later cleanup; when the fence is already signaled\n(err \u003d\u003d -ENOENT) it manually drops the extra reference with\ndma_fence_put(fence).\n\nHowever, dma_fence_add_callback() can fail with other errors\n(e.g. -EINVAL) and in that case the code falls through to the free:\nlabel without releasing the acquired reference, leaking it.\n\nFix the leak by adding an else branch that calls dma_fence_put()\nbefore jumping to free: for any error other than -ENOENT.\n\nFixes: 845f64bdbfc9 (\"drm/xe: Introduce a range-fence utility\")\nSigned-off-by: Wentao Liang \u003cvulab@iscas.ac.cn\u003e\nReviewed-by: Matthew Brost \u003cmatthew.brost@intel.com\u003e\nSigned-off-by: Matthew Brost \u003cmatthew.brost@intel.com\u003e\nLink: https://patch.msgid.link/20260610172705.3450560-1-matthew.brost@intel.com\n(cherry picked from commit 98c4a4201290823c2c5c7ba21692bd9a64b61021)\nSigned-off-by: Matthew Brost \u003cmatthew.brost@intel.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "372378e89e989239833879e23d2e62a2fd573b54",
      "old_mode": 33188,
      "old_path": "drivers/gpu/drm/xe/xe_range_fence.c",
      "new_id": "3d8fa194a7b0eb66c6c9b3cbbb56931f393cfd73",
      "new_mode": 33188,
      "new_path": "drivers/gpu/drm/xe/xe_range_fence.c"
    }
  ]
}
