Re: [linux-next:master] [mm/zswap] 18ce3c9e4c: BUG:spinlock_bad_magic_on_CPU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2024/3/5 14:02, kernel test robot wrote:
> 
> 
> Hello,
> 
> kernel test robot noticed "BUG:spinlock_bad_magic_on_CPU" on:
> 
> commit: 18ce3c9e4c2d7cc1b7eaf1e8cc95be8e34209dac ("mm/zswap: global lru and shrinker shared by all zswap_pools")
> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master
> 
> [test failed on linux-next/master 67908bf6954b7635d33760ff6dfc189fc26ccc89]
> 
> in testcase: boot
> 
> compiler: clang-17
> test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
> 
> (please refer to attached dmesg/kmsg for entire log/backtrace)
> 
> 
> +----------------------------------------------------+------------+------------+
> |                                                    | acc2918c08 | 18ce3c9e4c |
> +----------------------------------------------------+------------+------------+
> | BUG:spinlock_bad_magic_on_CPU                      | 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/202403051008.a8cf8a94-lkp@xxxxxxxxx
> 
> 
> 
> [   88.645344][    T8] BUG: spinlock bad magic on CPU#0, kworker/0:1/8
> [ 88.645699][ T8] lock: zswap+0xd0/0x110, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0 
> [   88.646351][    T8] CPU: 0 PID: 8 Comm: kworker/0:1 Tainted: G        W       TN 6.8.0-rc5-00353-g18ce3c9e4c2d #1
> [   88.646922][    T8] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
> [   88.647458][    T8] Workqueue: cgroup_destroy css_killed_work_fn
> [   88.647785][    T8] Call Trace:
> [   88.648049][    T8]  <TASK>
> [ 88.648308][ T8] dump_stack_lvl (lib/dump_stack.c:107) 
> [ 88.648557][ T8] do_raw_spin_lock (kernel/locking/spinlock_debug.c:?) 
> [ 88.648807][ T8] zswap_memcg_offline_cleanup (mm/zswap.c:784) 

Hmm, zswap is not enabled so this new spinlock is not initialized at all...

Maybe it's better to take Nhat's suggestion to change static struct zswap {}
to multiple static variables, to keep in consistent with other global variables
in zswap.

I will fix it and sent out a hotfix after testing.

Thanks.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux