)]}'
{"id":"userspace-rcu~8441","triplet_id":"userspace-rcu~master~Id024e7d3b2dab75d30fc01280fd27e5f2d8af0d1","project":"userspace-rcu","branch":"master","topic":"fix-futex-race","hashtags":[],"change_id":"Id024e7d3b2dab75d30fc01280fd27e5f2d8af0d1","subject":"Fix: workqueue: futex wait: handle spurious futex wakeups","status":"MERGED","created":"2022-06-22 20:50:52.000000000","updated":"2022-06-27 14:30:14.000000000","submitted":"2022-06-27 14:30:14.000000000","submitter":{"_account_id":1000009,"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","username":"compudj","avatars":[{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"8441-fix-futex-race","meta_rev_id":"29211dfbe64db32ba0bb72b3dbc31fd6ad10002a","_number":8441,"virtual_id_number":8441,"owner":{"_account_id":1000009,"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","username":"compudj","avatars":[{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"actions":{},"labels":{"Code-Review":{"all":[{"value":0,"_account_id":1000009,"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","username":"compudj","avatars":[{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]}],"values":{"-2":"This shall not be merged","-1":"I would prefer this is not merged as is"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me, approved"},"description":"","default_value":0,"optional":true},"Verified":{"all":[{"value":0,"_account_id":1000009,"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","username":"compudj","avatars":[{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]}],"values":{"-2":"Failure","-1":"Not built"," 0":"No score","+1":"Unstable","+2":"Success"},"description":"CI Build results","default_value":0,"optional":true},"CI-Build":{"all":[{"value":0,"_account_id":1000009,"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","username":"compudj","avatars":[{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]}],"values":{" 0":"No score","+1":"Trigger a CI build"},"description":"Trigger CI builds","default_value":0,"optional":true},"Smoke-Build-Lvl1":{"all":[{"value":0,"_account_id":1000009,"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","username":"compudj","avatars":[{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]}],"values":{" 0":"No score","+1":"Trigger a level 1 smoke build"},"description":"Trigger Level 1 Smoke builds","default_value":0,"optional":true},"Smoke-Build-Lvl2":{"all":[{"value":0,"_account_id":1000009,"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","username":"compudj","avatars":[{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]}],"values":{" 0":"No score","+1":"Trigger a level 2 smoke build"},"description":"Trigger Level 2 Smoke builds","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{},"pending_reviewers":{},"reviewer_updates":[],"messages":[{"id":"71f6d53ab5347633859c82a2d54da2cac4b19ce9","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000009,"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","username":"compudj","avatars":[{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"date":"2022-06-22 20:50:52.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"e24569440c7bd5d87b27d3700d50f5c855456896","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000009,"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","username":"compudj","avatars":[{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"date":"2022-06-23 19:09:31.000000000","message":"Uploaded patch set 2: Commit message was updated.","accounts_in_message":[],"_revision_number":2},{"id":"29211dfbe64db32ba0bb72b3dbc31fd6ad10002a","tag":"autogenerated:gerrit:merged","author":{"_account_id":1000009,"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","username":"compudj","avatars":[{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"date":"2022-06-27 14:30:14.000000000","message":"Change has been successfully pushed.","accounts_in_message":[],"_revision_number":3}],"current_revision_number":3,"current_revision":"80c34c2de3d970eb82049798357743cfa71e8b54","revisions":{"08bb27c338b24b19d850c6ec4841258a32601d05":{"kind":"REWORK","_number":1,"created":"2022-06-22 20:50:52.000000000","uploader":{"_account_id":1000009,"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","username":"compudj","avatars":[{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"ref":"refs/changes/41/8441/1","fetch":{"anonymous http":{"url":"https://review.lttng.org/userspace-rcu","ref":"refs/changes/41/8441/1","commands":{"Branch":"git fetch https://review.lttng.org/userspace-rcu refs/changes/41/8441/1 \u0026\u0026 git checkout -b change-8441 FETCH_HEAD","Checkout":"git fetch https://review.lttng.org/userspace-rcu refs/changes/41/8441/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.lttng.org/userspace-rcu refs/changes/41/8441/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.lttng.org/userspace-rcu refs/changes/41/8441/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.lttng.org/userspace-rcu refs/changes/41/8441/1","Reset To":"git fetch https://review.lttng.org/userspace-rcu refs/changes/41/8441/1 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"59b6b14faa1ef105997fdffd9048ec56b3808ce8","subject":"Fix: Use %lu rather than %ld to print count","web_links":[{"name":"gitweb","tooltip":"Open in GitWeb","url":"/gitweb?p\u003duserspace-rcu.git;a\u003dcommit;h\u003d59b6b14faa1ef105997fdffd9048ec56b3808ce8"}]}],"author":{"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","date":"2022-06-22 20:28:53.000000000","tz":-240},"committer":{"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","date":"2022-06-22 20:28:53.000000000","tz":-240},"subject":"Fix: workqueue: futex wait: handle spurious futex wakeups","message":"Fix: workqueue: futex wait: handle spurious futex wakeups\n\nFrom futex(5):\n\n       FUTEX_WAIT\n              Returns 0 if the caller was woken up.  Note that a  wake-up  can\n              also  be caused by common futex usage patterns in unrelated code\n              that happened to have previously used the  futex  word\u0027s  memory\n              location  (e.g., typical futex-based implementations of Pthreads\n              mutexes can cause this under some conditions).  Therefore, call‐\n              ers should always conservatively assume that a return value of 0\n              can mean a spurious wake-up, and  use  the  futex  word\u0027s  value\n              (i.e.,  the user-space synchronization scheme) to decide whether\n              to continue to block or not.\n\nWe therefore need to validate whether the value differs from -1 in\nuser-space after the call to FUTEX_WAIT returns 0.\n\nSigned-off-by: Mathieu Desnoyers \u003cmathieu.desnoyers@efficios.com\u003e\nChange-Id: Id024e7d3b2dab75d30fc01280fd27e5f2d8af0d1\n","web_links":[{"name":"gitweb","tooltip":"Open in GitWeb","url":"/gitweb?p\u003duserspace-rcu.git;a\u003dcommit;h\u003d08bb27c338b24b19d850c6ec4841258a32601d05"}],"resolve_conflicts_web_links":[{"name":"gitweb","tooltip":"Open in GitWeb","url":"/gitweb?p\u003duserspace-rcu.git;a\u003dcommit;h\u003d08bb27c338b24b19d850c6ec4841258a32601d05"}]},"branch":"refs/heads/master"},"34c0b948417e9f85b6e62560ce8f372b1a0672c1":{"kind":"NO_CODE_CHANGE","_number":2,"created":"2022-06-23 19:09:31.000000000","uploader":{"_account_id":1000009,"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","username":"compudj","avatars":[{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"ref":"refs/changes/41/8441/2","fetch":{"anonymous http":{"url":"https://review.lttng.org/userspace-rcu","ref":"refs/changes/41/8441/2","commands":{"Branch":"git fetch https://review.lttng.org/userspace-rcu refs/changes/41/8441/2 \u0026\u0026 git checkout -b change-8441 FETCH_HEAD","Checkout":"git fetch https://review.lttng.org/userspace-rcu refs/changes/41/8441/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.lttng.org/userspace-rcu refs/changes/41/8441/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.lttng.org/userspace-rcu refs/changes/41/8441/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.lttng.org/userspace-rcu refs/changes/41/8441/2","Reset To":"git fetch https://review.lttng.org/userspace-rcu refs/changes/41/8441/2 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"59b6b14faa1ef105997fdffd9048ec56b3808ce8","subject":"Fix: Use %lu rather than %ld to print count","web_links":[{"name":"gitweb","tooltip":"Open in GitWeb","url":"/gitweb?p\u003duserspace-rcu.git;a\u003dcommit;h\u003d59b6b14faa1ef105997fdffd9048ec56b3808ce8"}]}],"author":{"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","date":"2022-06-22 20:28:53.000000000","tz":-240},"committer":{"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","date":"2022-06-23 19:09:18.000000000","tz":-240},"subject":"Fix: workqueue: futex wait: handle spurious futex wakeups","message":"Fix: workqueue: futex wait: handle spurious futex wakeups\n\nObserved issue\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nThe workqueue thread futex_wait() returns with a workqueue-\u003efutex state\nof -1, which is unexpected. In this situation, the workqueue thread is\nobserved to use 99% of CPU as workqueue-\u003efutex values are decremented to\nvery low negative values while the workqueue is empty.\n\nThis issue will cause spurious unexpected high CPU use, but will not\nlead to data corruption.\n\nCause\n\u003d\u003d\u003d\u003d\u003d\n\nFrom futex(5):\n\n       FUTEX_WAIT\n              Returns 0 if the caller was woken up.  Note that a  wake-up  can\n              also  be caused by common futex usage patterns in unrelated code\n              that happened to have previously used the  futex  word\u0027s  memory\n              location  (e.g., typical futex-based implementations of Pthreads\n              mutexes can cause this under some conditions).  Therefore, call‐\n              ers should always conservatively assume that a return value of 0\n              can mean a spurious wake-up, and  use  the  futex  word\u0027s  value\n              (i.e.,  the user-space synchronization scheme) to decide whether\n              to continue to block or not.\n\nSolution\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nWe therefore need to validate whether the value differs from -1 in\nuser-space after the call to FUTEX_WAIT returns 0.\n\nKnown drawbacks\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nNone.\n\nSigned-off-by: Mathieu Desnoyers \u003cmathieu.desnoyers@efficios.com\u003e\nChange-Id: Id024e7d3b2dab75d30fc01280fd27e5f2d8af0d1\n","web_links":[{"name":"gitweb","tooltip":"Open in GitWeb","url":"/gitweb?p\u003duserspace-rcu.git;a\u003dcommit;h\u003d34c0b948417e9f85b6e62560ce8f372b1a0672c1"}],"resolve_conflicts_web_links":[{"name":"gitweb","tooltip":"Open in GitWeb","url":"/gitweb?p\u003duserspace-rcu.git;a\u003dcommit;h\u003d34c0b948417e9f85b6e62560ce8f372b1a0672c1"}]},"branch":"refs/heads/master"},"80c34c2de3d970eb82049798357743cfa71e8b54":{"kind":"NO_CHANGE","_number":3,"created":"2022-06-27 14:30:14.000000000","uploader":{"_account_id":1000009,"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","username":"compudj","avatars":[{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/7326b3e1d32b971a5e69d9730228c428.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"ref":"refs/changes/41/8441/3","fetch":{"anonymous http":{"url":"https://review.lttng.org/userspace-rcu","ref":"refs/changes/41/8441/3","commands":{"Branch":"git fetch https://review.lttng.org/userspace-rcu refs/changes/41/8441/3 \u0026\u0026 git checkout -b change-8441 FETCH_HEAD","Checkout":"git fetch https://review.lttng.org/userspace-rcu refs/changes/41/8441/3 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.lttng.org/userspace-rcu refs/changes/41/8441/3 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.lttng.org/userspace-rcu refs/changes/41/8441/3 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.lttng.org/userspace-rcu refs/changes/41/8441/3","Reset To":"git fetch https://review.lttng.org/userspace-rcu refs/changes/41/8441/3 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"59b6b14faa1ef105997fdffd9048ec56b3808ce8","subject":"Fix: Use %lu rather than %ld to print count","web_links":[{"name":"gitweb","tooltip":"Open in GitWeb","url":"/gitweb?p\u003duserspace-rcu.git;a\u003dcommit;h\u003d59b6b14faa1ef105997fdffd9048ec56b3808ce8"}]}],"author":{"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","date":"2022-06-22 20:28:53.000000000","tz":-240},"committer":{"name":"Mathieu Desnoyers","email":"mathieu.desnoyers@efficios.com","date":"2022-06-27 14:30:13.000000000","tz":-240},"subject":"Fix: workqueue: futex wait: handle spurious futex wakeups","message":"Fix: workqueue: futex wait: handle spurious futex wakeups\n\nObserved issue\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nThe workqueue thread futex_wait() returns with a workqueue-\u003efutex state\nof -1, which is unexpected. In this situation, the workqueue thread is\nobserved to use 99% of CPU as workqueue-\u003efutex values are decremented to\nvery low negative values while the workqueue is empty.\n\nThis issue will cause spurious unexpected high CPU use, but will not\nlead to data corruption.\n\nCause\n\u003d\u003d\u003d\u003d\u003d\n\nFrom futex(5):\n\n       FUTEX_WAIT\n              Returns 0 if the caller was woken up.  Note that a  wake-up  can\n              also  be caused by common futex usage patterns in unrelated code\n              that happened to have previously used the  futex  word\u0027s  memory\n              location  (e.g., typical futex-based implementations of Pthreads\n              mutexes can cause this under some conditions).  Therefore, call‐\n              ers should always conservatively assume that a return value of 0\n              can mean a spurious wake-up, and  use  the  futex  word\u0027s  value\n              (i.e.,  the user-space synchronization scheme) to decide whether\n              to continue to block or not.\n\nSolution\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nWe therefore need to validate whether the value differs from -1 in\nuser-space after the call to FUTEX_WAIT returns 0.\n\nKnown drawbacks\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nNone.\n\nSigned-off-by: Mathieu Desnoyers \u003cmathieu.desnoyers@efficios.com\u003e\nChange-Id: Id024e7d3b2dab75d30fc01280fd27e5f2d8af0d1\n","web_links":[{"name":"gitweb","tooltip":"Open in GitWeb","url":"/gitweb?p\u003duserspace-rcu.git;a\u003dcommit;h\u003d80c34c2de3d970eb82049798357743cfa71e8b54"}],"resolve_conflicts_web_links":[{"name":"gitweb","tooltip":"Open in GitWeb","url":"/gitweb?p\u003duserspace-rcu.git;a\u003dcommit;h\u003d80c34c2de3d970eb82049798357743cfa71e8b54"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[],"submit_requirements":[]}
