tree: https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git mips-next head: 826eeaf68b03e5b96bdbc11e3e796f8b562bc0e3 commit: e4de2057698636c0ee709e545d19b169d2069fa3 [61/63] MIPS: KVM: Fix NULL pointer dereference config: mips-randconfig-r003-20230706 (https://download.01.org/0day-ci/archive/20230706/202307062346.qFQwcnAo-lkp@xxxxxxxxx/config) compiler: mipsel-linux-gcc (GCC) 12.3.0 reproduce: (https://download.01.org/0day-ci/archive/20230706/202307062346.qFQwcnAo-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/202307062346.qFQwcnAo-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): arch/mips/kvm/stats.c: In function 'kvm_mips_dump_stats': >> arch/mips/kvm/stats.c:57:44: error: invalid type argument of '->' (have 'struct mips_coproc') 57 | if (vcpu->arch.cop0->stat[i][j]) | ^~ In file included from include/asm-generic/bug.h:22, from arch/mips/include/asm/bug.h:42, from include/linux/bug.h:5, from include/linux/mmdebug.h:5, from include/linux/percpu.h:5, from include/linux/context_tracking_state.h:5, from include/linux/hardirq.h:5, from include/linux/kvm_host.h:7, from arch/mips/kvm/stats.c:12: arch/mips/kvm/stats.c:59:57: error: invalid type argument of '->' (have 'struct mips_coproc') 59 | vcpu->arch.cop0->stat[i][j]); | ^~ include/linux/printk.h:427:33: note: in definition of macro 'printk_index_wrap' 427 | _p_func(_fmt, ##__VA_ARGS__); \ | ^~~~~~~~~~~ include/linux/printk.h:528:9: note: in expansion of macro 'printk' 528 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~ include/linux/kvm_host.h:814:9: note: in expansion of macro 'pr_info' 814 | pr_info("kvm [%i]: " fmt, task_pid_nr(current), ## __VA_ARGS__) | ^~~~~~~ arch/mips/kvm/stats.c:58:33: note: in expansion of macro 'kvm_info' 58 | kvm_info("%s[%d]: %lu\n", kvm_cop0_str[i], j, | ^~~~~~~~ vim +57 arch/mips/kvm/stats.c 3c20ef526253da arch/mips/kvm/kvm_mips_stats.c Sanjay Lal 2012-11-21 48 d98403a525fe16 arch/mips/kvm/kvm_mips_stats.c Dengcheng Zhu 2014-06-26 49 void kvm_mips_dump_stats(struct kvm_vcpu *vcpu) 3c20ef526253da arch/mips/kvm/kvm_mips_stats.c Sanjay Lal 2012-11-21 50 { 3c20ef526253da arch/mips/kvm/kvm_mips_stats.c Sanjay Lal 2012-11-21 51 #ifdef CONFIG_KVM_MIPS_DEBUG_COP0_COUNTERS 3c20ef526253da arch/mips/kvm/kvm_mips_stats.c Sanjay Lal 2012-11-21 52 int i, j; 3c20ef526253da arch/mips/kvm/kvm_mips_stats.c Sanjay Lal 2012-11-21 53 6ad78a5c75c5bc arch/mips/kvm/kvm_mips_stats.c Dengcheng Zhu 2014-06-26 54 kvm_info("\nKVM VCPU[%d] COP0 Access Profile:\n", vcpu->vcpu_id); 3c20ef526253da arch/mips/kvm/kvm_mips_stats.c Sanjay Lal 2012-11-21 55 for (i = 0; i < N_MIPS_COPROC_REGS; i++) { 3c20ef526253da arch/mips/kvm/kvm_mips_stats.c Sanjay Lal 2012-11-21 56 for (j = 0; j < N_MIPS_COPROC_SEL; j++) { 3c20ef526253da arch/mips/kvm/kvm_mips_stats.c Sanjay Lal 2012-11-21 @57 if (vcpu->arch.cop0->stat[i][j]) :::::: The code at line 57 was first introduced by commit :::::: 3c20ef526253da02348ec45768d5a90813577d88 KVM/MIPS32: COP0 accesses profiling. :::::: TO: Sanjay Lal <sanjayl@xxxxxxxxxxx> :::::: CC: Ralf Baechle <ralf@xxxxxxxxxxxxxx> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki