Skip to contentSkip to conversation

staging: fsl-mc: Do not allow building as a module

PATCH In review Thierry Reding 2 participants 4 messages Feb 15, 2016 – Feb 19, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 staging: fsl-mc: Do not allow building as a module

From: Thierry Reding <[email protected]>

This driver uses functionality (MSI IRQ domain) whose symbols aren't exported, and hence the modular build fails. While arguably there might be reasons to make these symbols available to modules, that change would be fairly involved and the set of exported functions should be carefully auditioned. Fix the build failure for now by marking the driver boolean.

Cc J. German Rivera <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/fsl-mc/bus/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fsl-mc/bus/Kconfig +1 -1
index c498ac6a72d5..1f959339c671 100644
@@ -7,7 +7,7 @@
 #
 
 config FSL_MC_BUS
-	tristate "Freescale Management Complex (MC) bus driver"
+	bool "Freescale Management Complex (MC) bus driver"
 	depends on OF && ARM64
 	select GENERIC_MSI_IRQ_DOMAIN
 	help
Signature · 1 line
2.7.1
#1 lore raw

PATCH 2/2 staging: fsl-mc: Avoid section mismatch

From: Thierry Reding <[email protected]>

The fsl_mc_allocator_driver_exit() function is marked __exit, but is called by the error handling code in fsl_mc_allocator_driver_init(). This results in a section mismatch, which in turn could lead to executing random code.

Remove the __exit annotation to fix this.

Cc J. German Rivera <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/fsl-mc/bus/mc-allocator.c   | 2 +-
 drivers/staging/fsl-mc/include/mc-private.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/fsl-mc/bus/mc-allocator.c +1 -1
index c5fa628411ec..86f8543c2b9a 100644
@@ -756,7 +756,7 @@ int __init fsl_mc_allocator_driver_init(void)
 	return fsl_mc_driver_register(&fsl_mc_allocator_driver);
 }
 
-void __exit fsl_mc_allocator_driver_exit(void)
+void fsl_mc_allocator_driver_exit(void)
 {
 	fsl_mc_driver_unregister(&fsl_mc_allocator_driver);
 }
drivers/staging/fsl-mc/include/mc-private.h +1 -1
index be72a44ba064..ee5f1d2bf604 100644
@@ -123,7 +123,7 @@ void dprc_driver_exit(void);
 
 int __init fsl_mc_allocator_driver_init(void);
 
-void __exit fsl_mc_allocator_driver_exit(void);
+void fsl_mc_allocator_driver_exit(void);
 
 int __must_check fsl_mc_resource_allocate(struct fsl_mc_bus *mc_bus,
 					  enum fsl_mc_pool_type pool_type,
Signature · 1 line
2.7.1
#2 lore raw
In reply to Thierry Reding
Quoted 8 lines · Thierry Reding

From: Thierry Reding <[email protected]>

This driver uses functionality (MSI IRQ domain) whose symbols aren't exported, and hence the modular build fails. While arguably there might be reasons to make these symbols available to modules, that change would be fairly involved and the set of exported functions should be carefully auditioned. Fix the build failure for now by marking the driver boolean.

Quoted 6 lines
Cc J. German Rivera <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/fsl-mc/bus/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Sorry for being pushy, but this has had allmodconfig builds broken in linux-next for a couple of days now. The driver has been marked BROKEN now in linux-next to remedy that, but having proper fixes seems better than that.

Thierry

#3 lore raw
Quoted 16 lines · Thierry Reding
Quoted 8 lines · Thierry Reding

From: Thierry Reding <[email protected]>

This driver uses functionality (MSI IRQ domain) whose symbols aren't exported, and hence the modular build fails. While arguably there might be reasons to make these symbols available to modules, that change would be fairly involved and the set of exported functions should be carefully auditioned. Fix the build failure for now by marking the driver boolean.

Quoted 6 lines
Cc J. German Rivera <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/fsl-mc/bus/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 4 lines

Sorry for being pushy, but this has had allmodconfig builds broken in linux-next for a couple of days now. The driver has been marked BROKEN now in linux-next to remedy that, but having proper fixes seems better than that.

Sorry for the delay, now merged, thanks.

greg k-h