From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 397EEC433FE for ; Wed, 17 Nov 2021 18:20:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1D90961BC1 for ; Wed, 17 Nov 2021 18:20:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239915AbhKQSXE (ORCPT ); Wed, 17 Nov 2021 13:23:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:54206 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230094AbhKQSXD (ORCPT ); Wed, 17 Nov 2021 13:23:03 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 086C861BC1; Wed, 17 Nov 2021 18:20:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637173204; bh=FBrlAqhn871oYVvr9mvGIxAz/ecPOq96bNZqG0+QPFw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0i+lTezY0Kf4tMj/aQXa51W3F7kfNg0IeEMYP8aAH1Vj4tckDivXscIMPB24/bpSf D/n+vqhCc16u7dHF050vKvuueoMRr5PbrgfWny6PDKQsn6AL9/AvGZQvO8/GfzUW44 ucCfYdRWsT/9MJvFXmbvLrFdE7cC6rEtS5oT7ocQ= Date: Wed, 17 Nov 2021 19:20:02 +0100 From: Greg KH To: Florian Fainelli Cc: stable@vger.kernel.org, Corentin Labbe , Andrew Lunn , "David S . Miller" , "open list:ETHERNET PHY LIBRARY" , open list Subject: Re: [PATCH stable 4.9] net: mdio-mux: fix unbalanced put_device Message-ID: References: <20211117180309.2737514-1-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211117180309.2737514-1-f.fainelli@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 17, 2021 at 10:03:08AM -0800, Florian Fainelli wrote: > From: Corentin Labbe > > commit 60f786525032432af1b7d9b8935cb12936244ccd upstream > > mdio_mux_uninit() call put_device (unconditionally) because of > of_mdio_find_bus() in mdio_mux_init. > But of_mdio_find_bus is only called if mux_bus is empty. > If mux_bus is set, mdio_mux_uninit will print a "refcount_t: underflow" > trace. > > This patch add a get_device in the other branch of "if (mux_bus)". > > Signed-off-by: Corentin Labbe > Reviewed-by: Andrew Lunn > Signed-off-by: David S. Miller > Signed-off-by: Florian Fainelli > --- > Note: this patch did not get any fixes tag, but it does fix issues > introduced by fdf3b78df4d2 ("mdio: mux: Correct mdio_mux_init error > path issues"). Now queued up, thanks. greg k-h