From patchwork Sat Jun 13 04:56:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremiah Mahler X-Patchwork-Id: 6601921 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8ACC5C0020 for ; Sat, 13 Jun 2015 04:57:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8501E2067D for ; Sat, 13 Jun 2015 04:57:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9FEC120678 for ; Sat, 13 Jun 2015 04:57:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751005AbbFME5Q (ORCPT ); Sat, 13 Jun 2015 00:57:16 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:32830 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750765AbbFME5P (ORCPT ); Sat, 13 Jun 2015 00:57:15 -0400 Received: by pdjn11 with SMTP id n11so35874355pdj.0; Fri, 12 Jun 2015 21:57:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=BtM5U+UaLAPNhoqzBEmyl8qz2eKqzzktw7ODQXnYibQ=; b=gfRY2TSGqzHbaxEorjarUmzA79WeQkWfAZXEUUcPuE+bLEm2FYbQ22tWyuDRE7+cFm ZlVgtOX8teKLAtsaZIlyYZTRkRu5te8cuAi0TudP1f+DDUO/gOsZGwqNWyKl6gT8ondH S2bYmggIa+Zl22dtyYeIPkLBq9ZbzddfDzW2A5kfAvmCk7KbLZ6vihd1Jk7KVF/rYts3 GuJDif98drk66gUTMJ/uPjcqCOkepvvL+n3M4/4o8FGcV3Y7fE/CkLA2T0vljUTQTu1G fwDrJN9wZvgkiJ8piw5DQgRDdxzuu1ABGZC2MTmG+ymvCAjbpryaFN4zs7qt925xMZER VHRQ== X-Received: by 10.66.182.161 with SMTP id ef1mr28650294pac.119.1434171434880; Fri, 12 Jun 2015 21:57:14 -0700 (PDT) Received: from localhost (108-76-185-60.lightspeed.frokca.sbcglobal.net. [108.76.185.60]) by mx.google.com with ESMTPSA id g2sm5229636pdh.11.2015.06.12.21.57.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jun 2015 21:57:13 -0700 (PDT) From: Jeremiah Mahler To: Herbert Xu Cc: "David S. Miller" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Jeremiah Mahler Subject: [PATCH] crypto: aesni-intel: fix crypto_fpu_exit() section mismatch Date: Fri, 12 Jun 2015 21:56:40 -0700 Message-Id: <1434171400-10566-1-git-send-email-jmmahler@gmail.com> X-Mailer: git-send-email 2.1.4 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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); }