Thread (27 messages) 27 messages, 7 authors, 2017-10-11

Re: [PATCH 1/2] IB/hfi1: Use preempt_{dis,en}able_nort()

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: 2017-10-05 16:30:25
Also in: linux-rdma, lkml

On 2017-10-03 12:49:19 [-0300], Arnaldo Carvalho de Melo wrote:
quoted hunk ↗ jump to hunk
From: Arnaldo Carvalho de Melo <redacted>
diff --git a/drivers/infiniband/hw/hfi1/pio.c b/drivers/infiniband/hw/hfi1/pio.c
index 615be68e40b3..3a30bde9a07b 100644
--- a/drivers/infiniband/hw/hfi1/pio.c
+++ b/drivers/infiniband/hw/hfi1/pio.c
@@ -1421,7 +1421,7 @@ struct pio_buf *sc_buffer_alloc(struct send_context *sc, u32 dw_len,
 
 	/* there is enough room */
 
-	preempt_disable();
+	preempt_disable_nort();
 	this_cpu_inc(*sc->buffers_allocated);
 
 	/* read this once */
please replace the preempt_disable() / enable with local_lock() /
unlock. The section does not look like it could cope with multiple users
dereferencing / using the same per-CPU variables.

Sebastian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help