[PATCH net v2 2/2] net: phylink: Add module_exit_stub()

Gan, Yi Fang yi.fang.gan at intel.com
Thu Jan 4 01:45:47 PST 2024


Hi Andrew,

The function phylink_init() is introduced by others.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.6.y&id=eca68a3c7d05b38b4e728cead0c49718f2bc1d5a 
The module_exit() is added by referring to
https://elixir.bootlin.com/linux/latest/source/kernel/module/main.c#L738.
Since the macro function is rejected, I will send a V3.
Let's see if Rusell King has any comment. Thanks.


Best Regards,
Gan Yi Fang

> -----Original Message-----
> From: Andrew Lunn <andrew at lunn.ch>
> Sent: Thursday, December 21, 2023 5:23 PM
> To: Gan, Yi Fang <yi.fang.gan at intel.com>
> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>; Andrew Halaney
> <ahalaney at redhat.com>; Javier Martinez Canillas <javierm at redhat.com>; John
> Stultz <jstultz at google.com>; Rafael J . Wysocki <rafael at kernel.org>; Jens Axboe
> <axboe at kernel.dk>; Russell King <linux at armlinux.org.uk>; Heiner Kallweit
> <hkallweit1 at gmail.com>; David S . Miller <davem at davemloft.net>; Eric
> Dumazet <edumazet at google.com>; Jakub Kicinski <kuba at kernel.org>; Paolo
> Abeni <pabeni at redhat.com>; Marek Behún <kabel at kernel.org>;
> netdev at vger.kernel.org; linux-stm32 at st-md-mailman.stormreply.com; linux-
> arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org; Looi, Hong Aun
> <hong.aun.looi at intel.com>; Voon, Weifeng <weifeng.voon at intel.com>; Song,
> Yoong Siang <yoong.siang.song at intel.com>; Lai, Peter Jun Ann
> <peter.jun.ann.lai at intel.com>; Choong, Yong Liang
> <yong.liang.choong at intel.com>
> Subject: Re: [PATCH net v2 2/2] net: phylink: Add module_exit_stub()
> 
> On Thu, Dec 21, 2023 at 04:51:09PM +0800, Gan, Yi Fang wrote:
> > In delete_module(), if mod->init callback is defined but mod->exit
> > callback is not defined, it will assume the module cannot be removed
> > and return EBUSY. The module_exit() is missing from current phylink
> > module drive causing failure while unloading it.
> 
> You are missing justification it is actually safe to remove phylink. Maybe Russell
> King deliberately did not implement
> module_exit() because it can explode in interesting ways if it was?
> 
> 	Andrew



More information about the linux-arm-kernel mailing list