Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969856AbdIZSEu (ORCPT ); Tue, 26 Sep 2017 14:04:50 -0400 Received: from mail.savoirfairelinux.com ([208.88.110.44]:54256 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967138AbdIZSEt (ORCPT ); Tue, 26 Sep 2017 14:04:49 -0400 From: Vivien Didelot To: Andrew Lunn Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Florian Fainelli Subject: Re: [PATCH net] net: dsa: mv88e6xxx: lock mutex when freeing IRQs In-Reply-To: <20170926180136.GD3325@lunn.ch> References: <20170926174837.15999-1-vivien.didelot@savoirfairelinux.com> <20170926180136.GD3325@lunn.ch> Date: Tue, 26 Sep 2017 14:01:11 -0400 Message-ID: <87mv5h5ogo.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 419 Lines: 15 Hi Andrew, Andrew Lunn writes: > In general, i tried to keep the mutex out of the interrupt code. That > is not totally possible, the IRQ thread handler needs it. But > otherwise, the IRQ code assumes it is called with the mutex taken. > > So i think it is better to hold the mutex in mv88e6xxx_remove() when > calling mv88e6xxx_g1_irq_free(). I'd prefer that too. Respinning, thanks! Vivien