This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug kprobes/3541] unsafe printk calls in hand-coded kprobe handlers
- From: "jkenisto at us dot ibm dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 22 Nov 2006 00:05:32 -0000
- Subject: [Bug kprobes/3541] unsafe printk calls in hand-coded kprobe handlers
- References: <20061117231901.3541.jkenisto@us.ibm.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jkenisto at us dot ibm dot com 2006-11-22 00:05 -------
Since kprobes doesn't allow handlers to re-enter, the likely deadlock scenario
is anybody -> printk -> release_console_sem [locks logbuf_lock] -> up -> ... ->
try_to_wake_up -> activate_task -> handler -> printk [goes for logbuf_lock again].
Re: (2b), spin_trylock_irqsave() (which is what we want) can fail in perfectly
benign scenarios. If it does, it's a deadlock only if printk_cpu ==
smp_processor_id(). Otherwise, just go for the lock again with spinlock_irq_save().
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3541
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.