diff options
author | Josh Poimboeuf <[email protected]> | 2023-02-24 08:50:00 -0800 |
---|---|---|
committer | Peter Zijlstra <[email protected]> | 2023-03-22 17:09:28 +0100 |
commit | e3ff7c609f39671d1aaff4fb4a8594e14f3e03f8 (patch) | |
tree | 6a531478136effed64ac3f8c738dd8c99615cbe9 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | 383439d3d400d4c5a7ffb4495124adc6be6a05e2 (diff) |
livepatch,sched: Add livepatch task switching to cond_resched()
There have been reports [1][2] of live patches failing to complete
within a reasonable amount of time due to CPU-bound kthreads.
Fix it by patching tasks in cond_resched().
There are four different flavors of cond_resched(), depending on the
kernel configuration. Hook into all of them.
A more elegant solution might be to use a preempt notifier. However,
non-ORC unwinders can't unwind a preempted task reliably.
[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://lkml.kernel.org/lkml/[email protected]
Signed-off-by: Josh Poimboeuf <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Tested-by: Seth Forshee (DigitalOcean) <[email protected]>
Link: https://lore.kernel.org/r/4ae981466b7814ec221014fc2554b2f86f3fb70b.1677257135.git.jpoimboe@kernel.org
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions