kernel/trace/trace_events_synth.c:47:1: sparse: sparse: symbol 'lastcmd_mutex' was not declared. Should it be static?
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 99ddf2254febae9eab7fb0bcc02c5322243f5c49 commit: 4ccf11c4e8a8e051499d53a12f502196c97a758e tracing/synthetic: Fix races on freeing last_cmd date: 3 days ago config: i386-randconfig-s031-20230403 (https://download.01.org/0day-ci/archive/20230406/[email protected]/config) compiler: gcc-11 (Debian 11.3.0-8) 11.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-39-gce1a6720-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4ccf11c4e8a8e051499d53a12f502196c97a758e git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 4ccf11c4e8a8e051499d53a12f502196c97a758e # save the config file mkdir build_dir && cp config build_dir/.config make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 olddefconfig make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash kernel/trace/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/
sparse warnings: (new ones prefixed by >>)
>> kernel/trace/trace_events_synth.c:47:1: sparse: sparse: symbol 'lastcmd_mutex' was not declared. Should it be static?
kernel/trace/trace_events_synth.c:475:68: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *unsafe_addr @@ got char *str_val @@
kernel/trace/trace_events_synth.c:475:68: sparse: expected void const [noderef] __user *unsafe_addr
kernel/trace/trace_events_synth.c:475:68: sparse: got char *str_val
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests