)]}'
{
  "commit": "38bf603d1ea5d5a65a9cb277df75327ffec01ff1",
  "tree": "641f0b7681333882b774d5722c17db29b5fcdecc",
  "parents": [
    "b2aa970a0a03c117306f48d75a4c3125a8cc9957"
  ],
  "author": {
    "name": "Nickolai Zeldovich",
    "email": "nickolai@csail.mit.edu",
    "time": "Fri Oct 23 21:55:13 2026 -0400"
  },
  "committer": {
    "name": "Christian Brauner",
    "email": "brauner@kernel.org",
    "time": "Fri Oct 30 16:02:40 2026 +0100"
  },
  "message": "ucount: read the parent ucounts before dropping the rlimit count\n\ndo_dec_rlimit_put_ucounts() drops its share of iter-\u003erlimit[type] and\nonly then loads iter-\u003ens-\u003eucounts. If the decrement leaves the count\nnon-zero, a concurrent caller can take it to zero and put the last\nreference, which frees the ucounts and possibly its user namespace with\nkfree_rcu(). An exiting task frees its pending signals without siglock\nor any RCU read-side section, so when it is preempted between the\ndecrement and the load for a grace period it reads freed memory and\nthen decrements a counter through the pointer it found there.\n\nA pending signal holds no reference on its ucounts: the reference is\ntaken by whoever moves the count from 0 to 1 and dropped by whoever\nmoves it back to 0, so the caller\u0027s share of the count is all that\nkeeps iter alive, and only until it is dropped.\n\nLoad the parent first; it stays pinned by the caller\u0027s share of its\nown count.\n\nFixes: 15bc01effefe (\"ucounts: Fix signal ucount refcounting\")\nSigned-off-by: Nickolai Zeldovich \u003cnickolai@csail.mit.edu\u003e\nLink: https://patch.msgid.link/20261024015513.830312-1-nickolai@csail.mit.edu\nReviewed-by: Bradley Morgan \u003cbrads@mainlining.org\u003e\nSigned-off-by: Christian Brauner (Amutable) \u003cbrauner@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c3de5b94d25f7c0e308d3cf335ec0fcd26ac6c8b",
      "old_mode": 33188,
      "old_path": "kernel/ucount.c",
      "new_id": "94b70502dc9ded4de4a946b73141119efc3a26fe",
      "new_mode": 33188,
      "new_path": "kernel/ucount.c"
    }
  ]
}
