summaryrefslogtreecommitdiffstats
path: root/runtime/print_new.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/print_new.c')
-rw-r--r--runtime/print_new.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/print_new.c b/runtime/print_new.c
index a1f1274d..b34aad8a 100644
--- a/runtime/print_new.c
+++ b/runtime/print_new.c
@@ -52,13 +52,14 @@ void _stp_print_flush (void)
#else
{
void *buf;
- spin_lock(&_stp_print_lock);
+ unsigned long flags;
+ spin_lock_irqsave(&_stp_print_lock, flags);
buf = relay_reserve(_stp_utt->rchan, len);
if (likely(buf))
memcpy(buf, pb->buf, len);
else
atomic_inc (&_stp_transport_failures);
- spin_unlock(&_stp_print_lock);
+ spin_unlock_irqrestore(&_stp_print_lock, flags);
}
#endif /* STP_BULKMODE */
}