)]}'
{
  "commit": "edcc8a38b5ac1a3dbd05e113a38a25b937ebefe5",
  "tree": "cbf70fa68f768c18cf95048496a6b38cc8f8c2a5",
  "parents": [
    "8327bd4fcb6c1dab01ce5c6ff00b42496836dcd2"
  ],
  "author": {
    "name": "Qi Xi",
    "email": "xiqi2@huawei.com",
    "time": "Tue Sep 09 19:29:10 2025 +0800"
  },
  "committer": {
    "name": "Arnd Bergmann",
    "email": "arnd@arndb.de",
    "time": "Thu Sep 25 08:01:16 2025 +0200"
  },
  "message": "once: fix race by moving DO_ONCE to separate section\n\nThe commit c2c60ea37e5b (\"once: use __section(\".data.once\")\") moved\nDO_ONCE\u0027s ___done variable to .data.once section, which conflicts with\nDO_ONCE_LITE() that also uses the same section.\n\nThis creates a race condition when clear_warn_once is used:\n\nThread 1 (DO_ONCE)             Thread 2 (DO_ONCE)\n__do_once_start\n    read ___done (false)\n    acquire once_lock\nexecute func\n__do_once_done\n    write ___done (true)      __do_once_start\n    release once_lock             // Thread 3 clear_warn_once reset ___done\n                                  read ___done (false)\n                                  acquire once_lock\n                              execute func\nschedule once_work            __do_once_done\nonce_deferred: OK             write ___done (true)\nstatic_branch_disable         release once_lock\n                              schedule once_work\n                              once_deferred:\n                                  BUG_ON(!static_key_enabled)\n\nDO_ONCE_LITE() in once_lite.h is used by WARN_ON_ONCE() and other warning\nmacros. Keep its ___done flag in the .data..once section and allow resetting\nby clear_warn_once, as originally intended.\n\nIn contrast, DO_ONCE() is used for functions like get_random_once() and\nrelies on its ___done flag for internal synchronization. We should not reset\nDO_ONCE() by clear_warn_once.\n\nFix it by isolating DO_ONCE\u0027s ___done into a separate .data..do_once section,\nshielding it from clear_warn_once.\n\nFixes: c2c60ea37e5b (\"once: use __section(\".data.once\")\")\nReported-by: Hulk Robot \u003chulkci@huawei.com\u003e\nSigned-off-by: Qi Xi \u003cxiqi2@huawei.com\u003e\nSigned-off-by: Arnd Bergmann \u003carnd@arndb.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ae2d2359b79e9e929e6507b107fe7099762f9a02",
      "old_mode": 33188,
      "old_path": "include/asm-generic/vmlinux.lds.h",
      "new_id": "8efbe8c4874ee89c4557e38248d811491413b9f1",
      "new_mode": 33188,
      "new_path": "include/asm-generic/vmlinux.lds.h"
    },
    {
      "type": "modify",
      "old_id": "30346fcdc7995d465e34162845718387a9258fd4",
      "old_mode": 33188,
      "old_path": "include/linux/once.h",
      "new_id": "449a0e34ad5ad9172eda728480c0a095cd43d24b",
      "new_mode": 33188,
      "new_path": "include/linux/once.h"
    }
  ]
}
