Oleg Nesterov c790b0ad23 hw_breakpoint: Use cpu_possible_mask in {reserve,release}_bp_slot()
fetch_bp_busy_slots() and toggle_bp_slot() use
for_each_online_cpu(), this is obviously wrong wrt cpu_up() or
cpu_down(), we can over/under account the per-cpu numbers.

For example:

	# echo 0 >> /sys/devices/system/cpu/cpu1/online
	# perf record -e mem:0x10 -p 1 &
	# echo 1 >> /sys/devices/system/cpu/cpu1/online
	# perf record -e mem:0x10,mem:0x10,mem:0x10,mem:0x10 -C1 -a &
	# taskset -p 0x2 1

triggers the same WARN_ONCE("Can't find any breakpoint slot") in
arch_install_hw_breakpoint().

Reported-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: <stable@vger.kernel.org>
Link: http://lkml.kernel.org/r/20130620155009.GA6327@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-20 17:57:01 +02:00
..
2013-05-06 11:37:43 +10:00
2013-04-22 07:09:06 -07:00
2012-05-31 17:49:27 -07:00
2012-03-28 18:30:03 +01:00
2013-04-15 13:25:16 +02:00
2012-12-20 17:40:19 -08:00
2012-05-29 23:28:41 -04:00
2013-05-07 20:16:25 -07:00
2013-05-07 20:16:25 -07:00
2013-05-05 00:16:35 -04:00
2013-04-30 17:04:03 -07:00
2013-04-29 13:55:38 -07:00