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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 85563C433DB for ; Wed, 23 Dec 2020 21:02:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 568302246B for ; Wed, 23 Dec 2020 21:02:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729212AbgLWVBs (ORCPT ); Wed, 23 Dec 2020 16:01:48 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:39142 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727605AbgLWVBs (ORCPT ); Wed, 23 Dec 2020 16:01:48 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1ksBFU-00DeoG-9X; Wed, 23 Dec 2020 22:00:44 +0100 Date: Wed, 23 Dec 2020 22:00:44 +0100 From: Andrew Lunn To: Jakub Kicinski Cc: Dinghao Liu , kjlu@umn.edu, "David S. Miller" , Jesse Brandeburg , Arnd Bergmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: ethernet: Fix memleak in ethoc_probe Message-ID: <20201223210044.GA3253993@lunn.ch> References: <20201223110615.31389-1-dinghao.liu@zju.edu.cn> <20201223153304.GD3198262@lunn.ch> <20201223123218.1cf7d9cb@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201223123218.1cf7d9cb@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Dec 23, 2020 at 12:32:18PM -0800, Jakub Kicinski wrote: > On Wed, 23 Dec 2020 16:33:04 +0100 Andrew Lunn wrote: > > On Wed, Dec 23, 2020 at 07:06:12PM +0800, Dinghao Liu wrote: > > > When mdiobus_register() fails, priv->mdio allocated > > > by mdiobus_alloc() has not been freed, which leads > > > to memleak. > > > > > > Signed-off-by: Dinghao Liu > > > > Fixes: bfa49cfc5262 ("net/ethoc: fix null dereference on error exit path") > > > > Reviewed-by: Andrew Lunn > > Ooof, I applied without looking at your email and I added: > > Fixes: e7f4dc3536a4 ("mdio: Move allocation of interrupts into core") [Goes and looks deeper] Yes, commit e7f4dc3536a4 looks like it introduced the original problem. bfa49cfc5262 just moved to code around a bit. Does patchwork not automagically add Fixes: lines from full up emails? That seems like a reasonable automation. Andrew