On Wed, 10 Apr 2024 at 20:53, Will Deacon will@kernel.org wrote:
On Wed, Apr 10, 2024 at 03:57:10PM +0530, Naresh Kamboju wrote:
Following kernel crash noticed on Linux next-20240410 tag while running kunit testing on qemu-arm64 and qemu-x86_64.
Reported-by: Linux Kernel Functional Testing lkft@linaro.org
Crash log on qemu-arm64:
<3>[ 30.465716] BUG: KASAN: null-ptr-deref in _raw_spin_lock_irq (include/linux/instrumented.h:96 include/linux/atomic/atomic-instrumented.h:1301 include/asm-generic/qspinlock.h:111 include/linux/spinlock.h:187 include/linux/spinlock_api_smp.h:120 kernel/locking/spinlock.c:170)
It's a shame that you have trimmed the register dump here.
My apologies for that, the detailed crash log is attached and the links provided in the tail of this email.
<4>[ 30.511022] Call trace: <4>[ 30.511437] _raw_spin_lock_irq (arch/arm64/include/asm/atomic_lse.h:271 arch/arm64/include/asm/cmpxchg.h:120 arch/arm64/include/asm/cmpxchg.h:169 include/linux/atomic/atomic-arch-fallback.h:2055 include/linux/atomic/atomic-arch-fallback.h:2173 include/linux/atomic/atomic-instrumented.h:1302 include/asm-generic/qspinlock.h:111 include/linux/spinlock.h:187 include/linux/spinlock_api_smp.h:120 kernel/locking/spinlock.c:170) <4>[ 30.512013] wait_for_completion_timeout (kernel/sched/completion.c:84 kernel/sched/completion.c:116 kernel/sched/completion.c:127 kernel/sched/completion.c:167) <4>[ 30.512627] kunit_try_catch_run (lib/kunit/try-catch.c:86) <4>[ 30.513188] kunit_run_case_catch_errors (lib/kunit/test.c:544) <4>[ 30.513801] kunit_run_tests (lib/kunit/test.c:635)
Ok, so 'task_struct->vfork_done' is NULL. Looks like this code was added recently, so adding Mickaël to cc.
Will
Thank you.
- Naresh