Re: [PATCH v1 1/1] acpica: use spinlocks to fix the data-races reported by the KCSAN

From: kernel test robot
Date: Wed Sep 20 2023 - 01:38:16 EST


Hi Mirsad,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.6-rc2 next-20230920]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Mirsad-Goran-Todorovac/acpica-use-spinlocks-to-fix-the-data-races-reported-by-the-KCSAN/20230920-080345
base: linus/master
patch link: https://lore.kernel.org/r/20230920000139.15533-1-mirsad.todorovac%40alu.unizg.hr
patch subject: [PATCH v1 1/1] acpica: use spinlocks to fix the data-races reported by the KCSAN
config: i386-randconfig-012-20230920 (https://download.01.org/0day-ci/archive/20230920/202309201308.5ZBJFbjh-lkp@xxxxxxxxx/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230920/202309201308.5ZBJFbjh-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309201308.5ZBJFbjh-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

In file included from include/linux/spinlock.h:89,
from include/linux/wait.h:9,
from include/linux/pid.h:6,
from include/linux/sched.h:14,
from include/acpi/platform/aclinux.h:55,
from include/acpi/platform/acenv.h:160,
from include/acpi/acpi.h:22,
from drivers/acpi/acpica/utdebug.c:12:
>> drivers/acpi/acpica/utdebug.c:19:24: warning: 'acpi_utdebug_lock' defined but not used [-Wunused-variable]
19 | static DEFINE_SPINLOCK(acpi_utdebug_lock);
| ^~~~~~~~~~~~~~~~~
include/linux/spinlock_types.h:43:39: note: in definition of macro 'DEFINE_SPINLOCK'
43 | #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x)
| ^


vim +/acpi_utdebug_lock +19 drivers/acpi/acpica/utdebug.c

11
> 12 #include <acpi/acpi.h>
13 #include "accommon.h"
14 #include "acinterp.h"
15
16 #define _COMPONENT ACPI_UTILITIES
17 ACPI_MODULE_NAME("utdebug")
18
> 19 static DEFINE_SPINLOCK(acpi_utdebug_lock);
20

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki