Re: [PATCH 2/2] ptrace: fix set_task_blockstep()->update_debugctlmsr()logic

From: Sebastian Andrzej Siewior
Date: Fri Aug 03 2012 - 14:28:32 EST


On 08/03/2012 07:38 PM, Oleg Nesterov wrote:
update_debugctlmsr(debugctl);
+ local_irq_enable();

wouldn't preempt_disable() be enough?

preempt_disable() can't help if interrupt handler changes
other bits in between?

So perf() uses this register as well. Since perf() uses the raw
primitives (raw_spin_lock()) shouldn't you do the same? If I recall
correctly (but it is Friday and late) local_irq_enable() wouldn't
disable irqs on RT and perf takes the raw lock so the irqs there should
be really disabled.


Oleg.

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/