]> git.baikalelectronics.ru Git - kernel.git/commit
perf: Add cond_resched() to task_function_call()
authorBarret Rhoden <brho@google.com>
Tue, 14 Apr 2020 22:29:20 +0000 (18:29 -0400)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 30 Apr 2020 18:14:36 +0000 (20:14 +0200)
commit504ff5309e65b8ad500d3ee8ded33ae500b0b540
treefecc8c994d7afd07581c2a56ab07c617e9304150
parent0ebb87d96a8ab001d01e11b48818d421f9011301
perf: Add cond_resched() to task_function_call()

Under rare circumstances, task_function_call() can repeatedly fail and
cause a soft lockup.

There is a slight race where the process is no longer running on the cpu
we targeted by the time remote_function() runs.  The code will simply
try again.  If we are very unlucky, this will continue to fail, until a
watchdog fires.  This can happen in a heavily loaded, multi-core virtual
machine.

Reported-by: syzbot+bb4935a5c09b5ff79940@syzkaller.appspotmail.com
Signed-off-by: Barret Rhoden <brho@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200414222920.121401-1-brho@google.com
kernel/events/core.c