lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202202230657.yONGvBnm-lkp@intel.com>
Date:   Wed, 23 Feb 2022 06:59:54 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [mingo-tip:sched/headers 2300/2324]
 drivers/hwtracing/coresight/coresight-syscfg.c:383:15: error: implicit
 declaration of function 'try_module_get'

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head:   7d9efc989eceed6a8fa475a186880ec4a1ad54a3
commit: b6ac2dbb891219be5e264504adb69b35c95647a8 [2300/2324] headers/deps: driver/core: Optimize <linux/device/driver.h> dependencies, remove <linux/module.h> inclusion
config: arm64-buildonly-randconfig-r006-20220221 (https://download.01.org/0day-ci/archive/20220223/202202230657.yONGvBnm-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=b6ac2dbb891219be5e264504adb69b35c95647a8
        git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
        git fetch --no-tags mingo-tip sched/headers
        git checkout b6ac2dbb891219be5e264504adb69b35c95647a8
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/hwtracing/coresight/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   In file included from arch/arm64/include/asm/current.h:5,
                    from include/linux/preempt.h:10,
                    from include/linux/spinlock_api.h:55,
                    from drivers/hwtracing/coresight/coresight-syscfg.c:7:
   drivers/hwtracing/coresight/coresight-syscfg.c: In function 'cscfg_owner_get':
>> drivers/hwtracing/coresight/coresight-syscfg.c:383:15: error: implicit declaration of function 'try_module_get' [-Werror=implicit-function-declaration]
     383 |             (!try_module_get(owner_info->owner_handle)))
         |               ^~~~~~~~~~~~~~
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
      58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
         |                                                    ^~~~
   drivers/hwtracing/coresight/coresight-syscfg.c:382:9: note: in expansion of macro 'if'
     382 |         if ((owner_info->type == CSCFG_OWNER_MODULE) &&
         |         ^~
   drivers/hwtracing/coresight/coresight-syscfg.c: In function 'cscfg_owner_put':
>> drivers/hwtracing/coresight/coresight-syscfg.c:392:17: error: implicit declaration of function 'module_put' [-Werror=implicit-function-declaration]
     392 |                 module_put(owner_info->owner_handle);
         |                 ^~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/try_module_get +383 drivers/hwtracing/coresight/coresight-syscfg.c

a13d5a246aca17 Mike Leach 2021-08-18  374  
eb2ec49606c2a0 Mike Leach 2021-11-24  375  /*
eb2ec49606c2a0 Mike Leach 2021-11-24  376   * Conditionally up reference count on owner to prevent unload.
eb2ec49606c2a0 Mike Leach 2021-11-24  377   *
eb2ec49606c2a0 Mike Leach 2021-11-24  378   * module loaded configs need to be locked in to prevent premature unload.
eb2ec49606c2a0 Mike Leach 2021-11-24  379   */
eb2ec49606c2a0 Mike Leach 2021-11-24  380  static int cscfg_owner_get(struct cscfg_load_owner_info *owner_info)
eb2ec49606c2a0 Mike Leach 2021-11-24  381  {
eb2ec49606c2a0 Mike Leach 2021-11-24  382  	if ((owner_info->type == CSCFG_OWNER_MODULE) &&
eb2ec49606c2a0 Mike Leach 2021-11-24 @383  	    (!try_module_get(owner_info->owner_handle)))
eb2ec49606c2a0 Mike Leach 2021-11-24  384  		return -EINVAL;
eb2ec49606c2a0 Mike Leach 2021-11-24  385  	return 0;
eb2ec49606c2a0 Mike Leach 2021-11-24  386  }
eb2ec49606c2a0 Mike Leach 2021-11-24  387  
eb2ec49606c2a0 Mike Leach 2021-11-24  388  /* conditionally lower ref count on an owner */
eb2ec49606c2a0 Mike Leach 2021-11-24  389  static void cscfg_owner_put(struct cscfg_load_owner_info *owner_info)
eb2ec49606c2a0 Mike Leach 2021-11-24  390  {
eb2ec49606c2a0 Mike Leach 2021-11-24  391  	if (owner_info->type == CSCFG_OWNER_MODULE)
eb2ec49606c2a0 Mike Leach 2021-11-24 @392  		module_put(owner_info->owner_handle);
eb2ec49606c2a0 Mike Leach 2021-11-24  393  }
eb2ec49606c2a0 Mike Leach 2021-11-24  394  

:::::: The code at line 383 was first introduced by commit
:::::: eb2ec49606c2a02d6382d56a0e19f34e515fde3f coresight: syscfg: Update load API for config loadable modules

:::::: TO: Mike Leach <mike.leach@...aro.org>
:::::: CC: Mathieu Poirier <mathieu.poirier@...aro.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ