From patchwork Thu Apr 23 06:48:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herbert Xu X-Patchwork-Id: 6259931 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 2462FBF4A6 for ; Thu, 23 Apr 2015 06:48:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 435C42038C for ; Thu, 23 Apr 2015 06:48:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1BB0C20389 for ; Thu, 23 Apr 2015 06:48:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751903AbbDWGsO (ORCPT ); Thu, 23 Apr 2015 02:48:14 -0400 Received: from helcar.hengli.com.au ([209.40.204.226]:42545 "EHLO helcar.hengli.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750893AbbDWGsN (ORCPT ); Thu, 23 Apr 2015 02:48:13 -0400 Received: from gondolin.me.apana.org.au ([192.168.0.6]) by norbury.hengli.com.au with esmtp (Exim 4.80 #3 (Debian)) id 1YlAvg-0006Zj-Ep; Thu, 23 Apr 2015 16:48:08 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 4.80) (envelope-from ) id 1YlAvd-00053s-Qq; Thu, 23 Apr 2015 14:48:05 +0800 Date: Thu, 23 Apr 2015 14:48:05 +0800 From: Herbert Xu To: kbuild test robot Cc: kbuild-all@01.org, Linux Crypto Mailing List Subject: crypto: api - Fix build error when modules are disabled Message-ID: <20150423064805.GA19442@gondor.apana.org.au> References: <201504231434.WFmkfUGj%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201504231434.WFmkfUGj%fengguang.wu@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 On Thu, Apr 23, 2015 at 02:27:36PM +0800, kbuild test robot wrote: > tree: git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master > head: 8a1a2b717e0d4d5f3e3bb59b7dee5079a15ab24b > commit: 59afdc7b32143528524455039e7557a46b60e4c8 [42/56] crypto: api - Move module sig ifdef into accessor function > config: xtensa-iss_defconfig (attached as .config) > reproduce: > wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > git checkout 59afdc7b32143528524455039e7557a46b60e4c8 > # save the attached .config to linux build tree > make.cross ARCH=xtensa > > All error/warnings: > > crypto/algapi.c: In function 'crypto_check_module_sig': > >> crypto/algapi.c:48:12: error: dereferencing pointer to incomplete type > mod->name); > ^ Thanks. This patch should fix the problem. ---8<--- The commit 59afdc7b32143528524455039e7557a46b60e4c8 ("crypto: api - Move module sig ifdef into accessor function") broke the build when modules are completely disabled because we directly dereference module->name. This patch fixes this by using the accessor function module_name. Reported-by: Fengguang Wu Signed-off-by: Herbert Xu diff --git a/crypto/algapi.c b/crypto/algapi.c index c63836f..3103e6a 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c @@ -46,7 +46,7 @@ static inline void crypto_check_module_sig(struct module *mod) { if (fips_enabled && mod && !module_sig_ok(mod)) panic("Module %s signature verification failed in FIPS mode\n", - mod->name); + module_name(mod)); } static int crypto_check_alg(struct crypto_alg *alg)