)]}'
{
  "commit": "bda345b3fc59f2899c50379c64a0734a3e720683",
  "tree": "bf494e8707e818ad9c5b69ab15c920e50bc1c7af",
  "parents": [
    "9d4815c14f7faf789aeaa63515024168daf0390c"
  ],
  "author": {
    "name": "Nguyen Ngoc Thang",
    "email": "ngocthang2710.1999@gmail.com",
    "time": "Wed Oct 14 22:43:41 2026 +0700"
  },
  "committer": {
    "name": "Tejun Heo",
    "email": "tj@kernel.org",
    "time": "Wed Oct 14 07:03:54 2026 -1000"
  },
  "message": "workqueue: mark pool-\u003enr_running as __data_racy\n\nwq_worker_running() increments pool-\u003enr_running with only preemption\ndisabled, while kick_pool_pick() reads it via need_more_worker() under\npool-\u003elock, so the two can run concurrently on different CPUs. KCSAN\nreports:\n\n  BUG: KCSAN: data-race in kick_pool_pick / wq_worker_running\n\n  write to 0xffff888059c2af24 of 4 bytes by task 3007 on cpu 0:\n   wq_worker_running+0x114/0x130\n   schedule_timeout+0x16e/0x180\n   io_schedule_timeout+0x4c/0x70\n   submit_bio_wait+0xd7/0x110\n   blkdev_issue_flush+0x4c/0x70\n   ext4_sync_file+0x60d/0x6c0\n   aio_fsync_work+0x7f/0x270\n   process_one_work+0x4ae/0xa00\n\n  read to 0xffff888059c2af24 of 4 bytes by task 3001 on cpu 1:\n   kick_pool_pick+0x7a/0x3a0\n   __queue_work+0x72d/0xcf0\n   queue_work_on+0x9d/0xb0\n   schedule_on_each_cpu+0x11a/0x2d0\n   vmstat_refresh+0x23/0x140\n   proc_sys_call_handler+0x2b9/0x4f0\n\nThe race is benign. The increment in wq_worker_running() is the only\nlockless write to nr_running; decrements and the reset are done under\npool-\u003elock, so a reader holding the lock sees either the old or the new\ncount. A stale 0 costs at most a spurious wakeup of an idle worker. A\nnonzero count is correct because the incrementing worker is running and\nre-checks the worklist under pool-\u003elock before it stops counting. The\nincrement can also go 1 -\u003e 2, e.g. when a worker sleeping in a work item\nwakes up after kick_pool() woke another worker.\n\nThe lockless increment is part of how nr_running is designed to work,\nas the comment above the field documents. Mark the field __data_racy\nso that every reader is covered, not just need_more_worker().\n\nReported-by: syzbot+8922e6b8343f70be92e8@syzkaller.appspotmail.com\nCloses: https://syzkaller.appspot.com/bug?extid\u003d8922e6b8343f70be92e8\nSigned-off-by: Nguyen Ngoc Thang \u003cngocthang2710.1999@gmail.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e618108c6127da829c2103f1465745e191bb8cbb",
      "old_mode": 33188,
      "old_path": "kernel/workqueue.c",
      "new_id": "41754f4126a65ac49265e4e3bb96e9f957682c0a",
      "new_mode": 33188,
      "new_path": "kernel/workqueue.c"
    }
  ]
}
