From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751421AbdJEQaZ (ORCPT ); Thu, 5 Oct 2017 12:30:25 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:35051 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751216AbdJEQaX (ORCPT ); Thu, 5 Oct 2017 12:30:23 -0400 Date: Thu, 5 Oct 2017 18:30:19 +0200 From: Sebastian Andrzej Siewior To: Arnaldo Carvalho de Melo Cc: linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Clark Williams , Dean Luick , Dennis Dalessandro , Doug Ledford , Kaike Wan , Leon Romanovsky , linux-rdma@vger.kernel.org, Peter Zijlstra , Sebastian Sanchez , Steven Rostedt , Thomas Gleixner Subject: Re: [PATCH 1/2] IB/hfi1: Use preempt_{dis,en}able_nort() Message-ID: <20171005163018.tk73i2vr2thaj2pn@linutronix.de> References: <20171003154920.31566-1-acme@kernel.org> <20171003154920.31566-2-acme@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20171003154920.31566-2-acme@kernel.org> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017-10-03 12:49:19 [-0300], Arnaldo Carvalho de Melo wrote: > From: Arnaldo Carvalho de Melo > > 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