From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: Re: [PATCHv4] irqchip: arm-gic: take gic_lock when updating irq type Date: Wed, 28 Mar 2018 15:36:53 +0100 Message-ID: <86370ks1ve.wl-marc.zyngier@arm.com> References: <20180328134200.7435-1-aniruddha.nitd@gmail.com> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <20180328134200.7435-1-aniruddha.nitd@gmail.com> Sender: stable-owner@vger.kernel.org To: Aniruddha Banerjee Cc: linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, aniruddhab@nvidia.com, stable@vger.kernel.org, vipink@nvidia.com, strasi@nvidia.com, swarren@nvidia.com, jonathanh@nvidia.com, talho@nvidia.com, treding@nvidia.com List-Id: linux-tegra@vger.kernel.org On Wed, 28 Mar 2018 14:42:00 +0100, Aniruddha Banerjee wrote: > > From: Aniruddha Banerjee > > The kernel documentation states that the locking of the irq-chip > registers should be handled by the irq-chip driver. In the irq-gic, > the accesses to the irqchip are seemingly not protected and multiple > writes to SPIs from different irq descriptors do RMW requests without > taking the irq-chip lock. When multiple irqs call the request_irq at > the same time, there can be a simultaneous write at the gic > distributor, leading to a race. Acquire the gic_lock when the > irq_type is updated. > > Cc: stable@vger.kernel.org > > Signed-off-by: Aniruddha Banerjee I've applied this after having reworked the commit log a bit. Thanks, M. -- Jazz is not dead, it just smell funny.