mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] crypto: aesni-intel: fix crypto_fpu_exit() section mismatch
@ 2015-06-13  4:56 Jeremiah Mahler
  2015-06-15 10:19 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Jeremiah Mahler @ 2015-06-13  4:56 UTC (permalink / raw)
  To: Herbert Xu
  Cc: David S. Miller, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, linux-crypto, linux-kernel, Jeremiah Mahler

The '__init aesni_init()' function calls the '__exit crypto_fpu_exit()'
function directly.  Since they are in different sections, this generates
a warning.

  make CONFIG_DEBUG_SECTION_MISMATCH=y
  ...
  WARNING: arch/x86/crypto/aesni-intel.o(.init.text+0x12b): Section
  mismatch in reference from the function init_module() to the function
  .exit.text:crypto_fpu_exit()
  The function __init init_module() references
  a function __exit crypto_fpu_exit().
  This is often seen when error handling in the init function
  uses functionality in the exit path.
  The fix is often to remove the __exit annotation of
  crypto_fpu_exit() so it may be used outside an exit section.

Fix the warning by removing the __exit annotation.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
---
 arch/x86/crypto/fpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/crypto/fpu.c b/arch/x86/crypto/fpu.c
index 5a2f30f..e7d679e 100644
--- a/arch/x86/crypto/fpu.c
+++ b/arch/x86/crypto/fpu.c
@@ -156,7 +156,7 @@ int __init crypto_fpu_init(void)
 	return crypto_register_template(&crypto_fpu_tmpl);
 }
 
-void __exit crypto_fpu_exit(void)
+void crypto_fpu_exit(void)
 {
 	crypto_unregister_template(&crypto_fpu_tmpl);
 }
-- 
2.1.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-15 10:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-13  4:56 [PATCH] crypto: aesni-intel: fix crypto_fpu_exit() section mismatch Jeremiah Mahler
2015-06-15 10:19 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®