Re: [PATCH 1/3] sched: Fix cgroup irq accounting for CONFIG_IRQ_TIME_ACCOUNTING

From: Yafang Shao
Date: Fri Sep 27 2024 - 04:47:28 EST


On Thu, Sep 26, 2024 at 2:14 PM kernel test robot <oliver.sang@xxxxxxxxx> wrote:
>
>
>
> Hello,
>
> kernel test robot noticed "WARNING:at_kernel/sched/sched.h:#cpuacct_charge" on:
>
> commit: e5633f7cf7d093cf5bb191663054441fbc745a5a ("[PATCH 1/3] sched: Fix cgroup irq accounting for CONFIG_IRQ_TIME_ACCOUNTING")
> url: https://github.com/intel-lab-lkp/linux/commits/Yafang-Shao/sched-Fix-cgroup-irq-accounting-for-CONFIG_IRQ_TIME_ACCOUNTING/20240923-170321
> base: https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git bc9057da1a220ff2cb6c8885fd5352558aceba2c
> patch link: https://lore.kernel.org/all/20240923090028.16368-2-laoar.shao@xxxxxxxxx/
> patch subject: [PATCH 1/3] sched: Fix cgroup irq accounting for CONFIG_IRQ_TIME_ACCOUNTING
>
> in testcase: boot
>
> compiler: clang-18
> test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
>
> (please refer to attached dmesg/kmsg for entire log/backtrace)
>
>
> +-------------------------------------------------+------------+------------+
> | | bc9057da1a | e5633f7cf7 |
> +-------------------------------------------------+------------+------------+
> | boot_successes | 12 | 0 |
> | boot_failures | 0 | 12 |
> | RIP:cpuacct_charge | 0 | 12 |
> | WARNING:at_kernel/sched/sched.h:#cpuacct_charge | 0 | 12 |
> | RIP:console_flush_all | 0 | 12 |
> | RIP:ftrace_likely_update | 0 | 12 |
> | RIP:desc_read | 0 | 12 |
> | RIP:handle_softirqs | 0 | 12 |
> | RIP:kasan_check_range | 0 | 12 |
> | RIP:_prb_read_valid | 0 | 12 |
> +-------------------------------------------------+------------+------------+
>
>
> 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 <oliver.sang@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-lkp/202409261230.c7f0e4eb-lkp@xxxxxxxxx

Thanks for the report.
The rq_lock should be held. I missed it.

--
Regards
Yafang