From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E89623BF; Wed, 26 Jun 2024 10:01:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719396113; cv=none; b=FnEMNBYC7swvc/Jlxdc3y1eSzMAwKWjihbm0Q0qh77gyJjxApkaO7U97ikT/xOYEeb8nBQGO76vhFgdC52hrmmrz7HVp+3cOTmjbw1ucWIK5/6Fb/N0L/dmD1pbDLMUGNQ+S6EOB9NLRsYO2+fXdumCJLb8kDiqoiWBjewUDoZY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719396113; c=relaxed/simple; bh=ZKYXmi9Zw7EkElH3xVsFfxtx1L1QW7kUwQppZKjbDbU=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SXbpV+dTlUQoisMTsibdkT3qZpqAoHgrYNCfbMO1tH0nkaUt9I63iDdqkesO7NzkezVytAAeAh5cmlLZ00vyYM42XzRN/FJk0cqRhjNlf4DfFOh12o7rr6BJQMwlsqlEkFfQl6M/5+++dLvi20CYLiHrgXcY1mMU3/WwKkT5uo8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=TSWd9oPS; arc=none smtp.client-ip=217.70.183.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="TSWd9oPS" Received: by mail.gandi.net (Postfix) with ESMTPSA id 821AC1BF20F; Wed, 26 Jun 2024 10:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1719396103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Dn3nBMGKGJrDwWGU8hyI8eTzDONmgOWvu3/mio4YDVg=; b=TSWd9oPSd5UiaKgEuf2Ms0FVuWUN02Z4wOBC8q9IVC5vKUNYyGhtkhLYAlCdhI70QWcHr1 2bgDS37b5hu5OiDLqoACB4e4W6cZrrail97ASJcDZBGyF6cKtNmwP30ZH77noa8InkAdfE pAaE+a2MYlSNImT6o82/USSYaCL6oPLesw9t4aupuvDaJCB/iPcCwzSFYF4A4D4uOm45zA 8NgzLU6ZeGj6CnKa5Ip+vHplUUpfJPZszPfKA4kcbAjiQzdXucn5Dw0F2zqak0J3FRWeD/ 7N+IStvXbKBxzWyAFnxq/VZoZQhLwy2Yougff0BaPv0L2tTE6SdPqPyLc80qoA== Date: Wed, 26 Jun 2024 12:01:37 +0200 From: Maxime Chevallier To: Marc Kleine-Budde Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Russell King , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Herve Codina , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , =?UTF-8?B?S8O2cnk=?= Maincent , Jesse Brandeburg , Marek =?UTF-8?B?QmVow7pu?= , Piergiorgio Beruto , Oleksij Rempel , =?UTF-8?B?Tmljb2zDsg==?= Veronese , Simon Horman , mwojtas@chromium.org, Nathan Chancellor , Antoine Tenart , kernel@pengutronix.de Subject: Re: [PATCH net-next v13 00/13] Introduce PHY listing and link_topology tracking Message-ID: <20240626120137.10c2ad61@fedora-5.home> In-Reply-To: <20240626-worm-of-remarkable-leadership-24f339-mkl@pengutronix.de> References: <20240607071836.911403-1-maxime.chevallier@bootlin.com> <20240626-worm-of-remarkable-leadership-24f339-mkl@pengutronix.de> Organization: Bootlin X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-redhat-linux-gnu) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-GND-Sasl: maxime.chevallier@bootlin.com Hello Marc, Thanks for giving this a test. On Wed, 26 Jun 2024 11:47:52 +0200 Marc Kleine-Budde wrote: > > # ethtool --show-phys * > > This creates the following warning for me: > > [ 51.877429] ------------[ cut here ]------------ > [ 51.882094] WARNING: CPU: 0 PID: 333 at lib/refcount.c:31 ref_tracker_free+0x1ac/0x254 > [ 51.890222] refcount_t: decrement hit 0; leaking memory. > [ 51.895611] Modules linked in: mcp251xfd flexcan imx_sdma can_dev spi_imx > [ 51.902493] CPU: 0 PID: 333 Comm: ethtool Not tainted 6.10.0-rc4+ #327 > [ 51.909056] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) > [ 51.915603] Call trace: > [ 51.915623] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [ 51.925979] [] (show_stack) from [] (dump_stack_lvl+0x50/0x64) > [ 51.933605] [] (dump_stack_lvl) from [] (__warn+0x88/0xc0) > [ 51.940877] [] (__warn) from [] (warn_slowpath_fmt+0x1b4/0x1c4) > [ 51.948590] [] (warn_slowpath_fmt) from [] (ref_tracker_free+0x1ac/0x254) > [ 51.957176] [] (ref_tracker_free) from [] (ethnl_phy_done+0x24/0x54) > [ 51.965318] [] (ethnl_phy_done) from [] (genl_done+0x3c/0x88) > [ 51.972845] [] (genl_done) from [] (netlink_dump+0x2d8/0x3d0) > [ 51.980387] [] (netlink_dump) from [] (__netlink_dump_start+0x1f4/0x2c4) > [ 51.988889] [] (__netlink_dump_start) from [] (genl_family_rcv_msg+0x140/0x328) > [ 51.997989] [] (genl_family_rcv_msg) from [] (genl_rcv_msg+0x44/0x88) > [ 52.006204] [] (genl_rcv_msg) from [] (netlink_rcv_skb+0xb8/0x118) > [ 52.014157] [] (netlink_rcv_skb) from [] (genl_rcv+0x20/0x34) > [ 52.021673] [] (genl_rcv) from [] (netlink_unicast+0x23c/0x3d0) > [ 52.029367] [] (netlink_unicast) from [] (netlink_sendmsg+0x18c/0x3d4) > [ 52.037667] [] (netlink_sendmsg) from [] (__sys_sendto+0xd4/0x128) > [ 52.045626] [] (__sys_sendto) from [] (ret_fast_syscall+0x0/0x54) > [ 52.053496] Exception stack(0xc3967fa8 to 0xc3967ff0) > [ 52.058576] 7fa0: b6f1130c 0000000c 00000003 015dd238 00000018 00000000 > [ 52.066780] 7fc0: b6f1130c 0000000c b6fb6700 00000122 00571000 00000001 0052a2f8 015dd190 > [ 52.074978] 7fe0: 00000122 bec7cf38 b6ea847d b6e1fe86 > [ 52.080184] ---[ end trace 0000000000000000 ]--- Hmm I've never seen this one before, but I could be missing some debug options. Looks like my ethnl_parse_header_dev_put() doesn't belong in the ethnl_phy_done() callback. I'll see if I can reproduce this error on some setups, and address that in the next iteration. > While a "ethtool --show-phys lan0" works w/o problems. Thanks a lot for the test, Maxime