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 X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BFF2C433B4 for ; Thu, 13 May 2021 12:22:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EBFEB6127A for ; Thu, 13 May 2021 12:22:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233585AbhEMMYB (ORCPT ); Thu, 13 May 2021 08:24:01 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:38584 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230526AbhEMMX7 (ORCPT ); Thu, 13 May 2021 08:23:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=xLMVguoQ+WwOwbw4bvkvN9oAzYjx5YfN/vAa8NY+De0=; b=ZT9uF500ybpTTuInRkFL7teEGD PCVXeFgFzNCPWAVHQlo1zfnrd0JaRn8pvUIXEj1aNs4DkQAgiDC574zs2uVij2gonP2ITdxQQMZj2 AWX/jY1FQRHIaMYqESpGaGr4oB2+xhIyAIXzd4O0O+XmB/pphqVrzF6o5vLgaI50PgG4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1lhAMS-0043eQ-9c; Thu, 13 May 2021 14:22:40 +0200 Date: Thu, 13 May 2021 14:22:40 +0200 From: Andrew Lunn To: Christophe JAILLET Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, kuba@kernel.org, f.fainelli@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] net: mdio: octeon: Fix some double free issues Message-ID: References: <7adc1815237605a0b774efb31a2ab22df51462d3.1620890610.git.christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7adc1815237605a0b774efb31a2ab22df51462d3.1620890610.git.christophe.jaillet@wanadoo.fr> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, May 13, 2021 at 09:24:55AM +0200, Christophe JAILLET wrote: > 'bus->mii_bus' has been allocated with 'devm_mdiobus_alloc_size()' in the > probe function. So it must not be freed explicitly or there will be a > double free. > > Remove the incorrect 'mdiobus_free' in the error handling path of the > probe function and in remove function. > > Suggested-By: Andrew Lunn > Fixes: 35d2aeac9810 ("phy: mdio-octeon: Use devm_mdiobus_alloc_size()") > Signed-off-by: Christophe JAILLET Reviewed-by: Andrew Lunn Andrew