commit | 0742c314c35c2c96b72e42076c76d6a6786045ba | [log] [tgz] |
---|---|---|
author | Olivier Houchard <cognet@ci0.org> | Thu Dec 05 15:11:19 2019 +0100 |
committer | Olivier Houchard <cognet@ci0.org> | Thu Dec 05 15:11:19 2019 +0100 |
tree | 4c960e51295a2677cfa5102aeda86bf7f0724f42 | |
parent | 2545a0b352ffb49e68e8945c9b8ce7e633d7e8b0 [diff] |
BUG/MEDIUM: tasks: Make sure we switch wait queues in task_set_affinity(). In task_set_affinity(), leave the wait_queue if any before changing the affinity, and re-enter a wait queue once it is done. If we don't do that, the task may stay in the wait queue of another thread, and we later may end up modifying that wait queue while holding no lock, which could lead to memory corruption. THis should be backported to 2.1, 2.0 and 1.9.