* [PATCH 1/2] staging: fsl-mc: Do not allow building as a module
@ 2016-02-15 13:22 Thierry Reding
2016-02-15 13:22 ` [PATCH 2/2] staging: fsl-mc: Avoid section mismatch Thierry Reding
2016-02-18 14:02 ` [PATCH 1/2] staging: fsl-mc: Do not allow building as a module Thierry Reding
0 siblings, 2 replies; 4+ messages in thread
From: Thierry Reding @ 2016-02-15 13:22 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: J . German Rivera, devel, linux-kernel
From: Thierry Reding <treding@nvidia.com>
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 <German.Rivera@freescale.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/staging/fsl-mc/bus/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/fsl-mc/bus/Kconfig b/drivers/staging/fsl-mc/bus/Kconfig
index c498ac6a72d5..1f959339c671 100644
--- a/drivers/staging/fsl-mc/bus/Kconfig
+++ b/drivers/staging/fsl-mc/bus/Kconfig
@@ -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
--
2.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] staging: fsl-mc: Avoid section mismatch
2016-02-15 13:22 [PATCH 1/2] staging: fsl-mc: Do not allow building as a module Thierry Reding
@ 2016-02-15 13:22 ` Thierry Reding
2016-02-18 14:02 ` [PATCH 1/2] staging: fsl-mc: Do not allow building as a module Thierry Reding
1 sibling, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2016-02-15 13:22 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: J . German Rivera, devel, linux-kernel
From: Thierry Reding <treding@nvidia.com>
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 <German.Rivera@freescale.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
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(-)
diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c b/drivers/staging/fsl-mc/bus/mc-allocator.c
index c5fa628411ec..86f8543c2b9a 100644
--- a/drivers/staging/fsl-mc/bus/mc-allocator.c
+++ b/drivers/staging/fsl-mc/bus/mc-allocator.c
@@ -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);
}
diff --git a/drivers/staging/fsl-mc/include/mc-private.h b/drivers/staging/fsl-mc/include/mc-private.h
index be72a44ba064..ee5f1d2bf604 100644
--- a/drivers/staging/fsl-mc/include/mc-private.h
+++ b/drivers/staging/fsl-mc/include/mc-private.h
@@ -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,
--
2.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] staging: fsl-mc: Do not allow building as a module
2016-02-15 13:22 [PATCH 1/2] staging: fsl-mc: Do not allow building as a module Thierry Reding
2016-02-15 13:22 ` [PATCH 2/2] staging: fsl-mc: Avoid section mismatch Thierry Reding
@ 2016-02-18 14:02 ` Thierry Reding
2016-02-19 4:36 ` Greg Kroah-Hartman
1 sibling, 1 reply; 4+ messages in thread
From: Thierry Reding @ 2016-02-18 14:02 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: J . German Rivera, devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 999 bytes --]
On Mon, Feb 15, 2016 at 02:22:22PM +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> 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 <German.Rivera@freescale.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] staging: fsl-mc: Do not allow building as a module
2016-02-18 14:02 ` [PATCH 1/2] staging: fsl-mc: Do not allow building as a module Thierry Reding
@ 2016-02-19 4:36 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2016-02-19 4:36 UTC (permalink / raw)
To: Thierry Reding; +Cc: devel, J . German Rivera, linux-kernel
On Thu, Feb 18, 2016 at 03:02:30PM +0100, Thierry Reding wrote:
> On Mon, Feb 15, 2016 at 02:22:22PM +0100, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> >
> > 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 <German.Rivera@freescale.com>
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> > 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.
Sorry for the delay, now merged, thanks.
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-19 4:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-15 13:22 [PATCH 1/2] staging: fsl-mc: Do not allow building as a module Thierry Reding
2016-02-15 13:22 ` [PATCH 2/2] staging: fsl-mc: Avoid section mismatch Thierry Reding
2016-02-18 14:02 ` [PATCH 1/2] staging: fsl-mc: Do not allow building as a module Thierry Reding
2016-02-19 4:36 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).