Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:
"Two kernel side fixes: a kprobes fix and a perf_remove_from_context()
fix (which does not yet fix the migration bug which is WIP)"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf: Fix a race condition in perf_remove_from_context()
kprobes/x86: Free 'optinsn' cache when range check fails

+13 -1
+3 -1
arch/x86/kernel/kprobes/opt.c
··· 338 338 * a relative jump. 339 339 */ 340 340 rel = (long)op->optinsn.insn - (long)op->kp.addr + RELATIVEJUMP_SIZE; 341 - if (abs(rel) > 0x7fffffff) 341 + if (abs(rel) > 0x7fffffff) { 342 + __arch_remove_optimized_kprobe(op, 0); 342 343 return -ERANGE; 344 + } 343 345 344 346 buf = (u8 *)op->optinsn.insn; 345 347
+10
kernel/events/core.c
··· 1524 1524 */ 1525 1525 if (ctx->is_active) { 1526 1526 raw_spin_unlock_irq(&ctx->lock); 1527 + /* 1528 + * Reload the task pointer, it might have been changed by 1529 + * a concurrent perf_event_context_sched_out(). 1530 + */ 1531 + task = ctx->task; 1527 1532 goto retry; 1528 1533 } 1529 1534 ··· 1972 1967 */ 1973 1968 if (ctx->is_active) { 1974 1969 raw_spin_unlock_irq(&ctx->lock); 1970 + /* 1971 + * Reload the task pointer, it might have been changed by 1972 + * a concurrent perf_event_context_sched_out(). 1973 + */ 1974 + task = ctx->task; 1975 1975 goto retry; 1976 1976 } 1977 1977