1
0
Fork 0
alistair23-linux/kernel/events
Oleg Nesterov e1ebe86203 hw_breakpoint: Simplify list/idx mess in toggle_bp_slot() paths
The enable/disable logic in toggle_bp_slot() is not symmetrical
and imho very confusing. "old_count" in toggle_bp_task_slot() is
actually new_count because this bp was already removed from the
list.

Change toggle_bp_slot() to always call list_add/list_del after
toggle_bp_task_slot(). This way old_idx is task_bp_pinned() and
this entry should be decremented, new_idx is +/-weight and we
need to increment this element. The code/logic looks obvious.

Reported-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/20130620155011.GA6330@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-20 17:58:55 +02:00
..
Makefile uprobes: Move to kernel/events/ 2012-02-22 11:08:00 +01:00
callchain.c perf: Add attribute to filter out callchains 2012-08-10 12:40:57 -03:00
core.c perf: Add const qualifier to perf_pmu_register's 'name' arg 2013-06-19 12:50:23 +02:00
hw_breakpoint.c hw_breakpoint: Simplify list/idx mess in toggle_bp_slot() paths 2013-06-20 17:58:55 +02:00
internal.h perf: Fix mmap() accounting hole 2013-06-19 12:44:13 +02:00
ring_buffer.c perf: Fix vmalloc ring buffer pages handling 2013-05-01 12:34:46 +02:00
uprobes.c uretprobes: Remove -ENOSYS as return probes implemented 2013-04-13 15:31:58 +02:00