sched: Always clear user_cpus_ptr in do_set_cpus_allowed()
authorWaiman Long <longman@redhat.com>
Thu, 22 Sep 2022 18:00:41 +0000 (14:00 -0400)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 27 Oct 2022 09:01:22 +0000 (11:01 +0200)
commit851a723e45d1c4c8f6f7b0d2cfbc5f53690bb4e9
tree29fd78c23541482be77e972ac9a55d3a50365da3
parentda019032819a1f09943d3af676892ec8c627668e
sched: Always clear user_cpus_ptr in do_set_cpus_allowed()

The do_set_cpus_allowed() function is used by either kthread_bind() or
select_fallback_rq(). In both cases the user affinity (if any) should be
destroyed too.

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220922180041.1768141-6-longman@redhat.com
kernel/sched/core.c