lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4FCD9BFD.7090103@st.com>
Date:	Tue, 05 Jun 2012 07:41:17 +0200
From:	Giuseppe CAVALLARO <peppe.cavallaro@...com>
To:	Rayagond K <rayagond@...avyalabs.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH (net.git) 4/4 (v2)] stmmac: fix driver Kconfig when built
 as module

On 6/5/2012 7:26 AM, Rayagond K wrote:
> Hi Giuseppe,
> 
> On Mon, Jun 4, 2012 at 9:07 PM, Giuseppe CAVALLARO
> <peppe.cavallaro@...com <mailto:peppe.cavallaro@...com>> wrote:
> 
>     This patches fixes the driver when built as dyn module.
>     In fact the platform part cannot be built and the probe fails
>     (thanks to Bob Liu that reported this bug).
> 
>     v2: as D. Miller suggested, it is not necessary to make the
>     pci and the platform code mutually exclusive.
>     Having both could also help, at built time ,to verify that
>     all the code is validated and compiles fine.
> 

[snip]

>     +static void __exit stmmac_exit(void)
>     +{
>     +       pci_unregister_driver(&stmmac_pci_driver);
>     +       platform_driver_unregister(&stmmac_pltfr_driver);
>     +}
> 
> 
> I guess, unregistering both PCI and platform driver should also be
> conditional else kernel may give warning message *"Unexpected driver
> unregister!".*
> 
> For example PCI driver registration will be successful only if there is
> PCI card on the system/board else registration will be failed, so if the
> register would have failed then unregistering the driver again will
> cause kernel warning message.
> 
> Please see *driver_unregister(*) function which is called from
> *pci_unregister_driver() *for more info.

Hmm, no driver does that because slightly redundant and, IMO, not
necessary in these cases.

Thanks for your feedback.
Peppe
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ