[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240405205903.GA3458@wunner.de>
Date: Fri, 5 Apr 2024 22:59:03 +0200
From: Lukas Wunner <lukas@...ner.de>
To: Heiner Kallweit <hkallweit1@...il.com>
Cc: Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Jakub Kicinski <kuba@...nel.org>,
David Miller <davem@...emloft.net>,
Realtek linux nic maintainers <nic_swsd@...ltek.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net] r8169: fix LED-related deadlock on module removal
On Fri, Apr 05, 2024 at 10:29:15PM +0200, Heiner Kallweit wrote:
> --- a/drivers/net/ethernet/realtek/r8169_leds.c
> +++ b/drivers/net/ethernet/realtek/r8169_leds.c
> @@ -146,13 +146,12 @@ static void rtl8168_setup_ldev(struct r8169_led_classdev *ldev,
> led_cdev->hw_control_get_device = r8169_led_hw_control_get_device;
>
> /* ignore errors */
> - devm_led_classdev_register(&ndev->dev, led_cdev);
> + devm_led_classdev_register(ndev->dev.parent, led_cdev);
IIUC, devm_led_classdev_register() uses the first argument both
to manage unregistering on unbind, but also as parent of the LED device.
While the former is desired, the latter likely is not.
I assume the LEDs now appear as children of the PCI device in sysfs,
not as children of the netdev. Probably not what you want.
The second patch I posted should handle that correctly.
Thanks,
Lukas
Powered by blists - more mailing lists