public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <oliver.sang@intel.com>
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Cc: oe-lkp@lists.linux.dev, lkp@intel.com,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Ingo Molnar" <mingo@redhat.com>, "Will Deacon" <will@kernel.org>,
	"Waiman Long" <longman@redhat.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Daniel Vetter" <daniel.vetter@intel.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Christian König" <christian.koenig@amd.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	oliver.sang@intel.com
Subject: Re: [RFC PATCH] locking/ww_mutex: Adjust to lockdep nest_lock requirements
Date: Tue, 12 Sep 2023 13:32:45 +0800	[thread overview]
Message-ID: <202309121305.81d349e5-oliver.sang@intel.com> (raw)
In-Reply-To: <20230911090729.5287-1-thomas.hellstrom@linux.intel.com>



Hello,

kernel test robot noticed "WARNING:possible_recursive_locking_detected" on:

commit: bb043828b2d487832c946751ffcc4ebd80d2a624 ("[RFC PATCH] locking/ww_mutex: Adjust to lockdep nest_lock requirements")
url: https://github.com/intel-lab-lkp/linux/commits/Thomas-Hellstr-m/locking-ww_mutex-Adjust-to-lockdep-nest_lock-requirements/20230911-170838
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link: https://lore.kernel.org/all/20230911090729.5287-1-thomas.hellstrom@linux.intel.com/
patch subject: [RFC PATCH] locking/ww_mutex: Adjust to lockdep nest_lock requirements

in testcase: boot

compiler: clang-16
test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G

(please refer to attached dmesg/kmsg for entire log/backtrace)



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@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202309121305.81d349e5-oliver.sang@intel.com


[  252.054712][    T1] WARNING: possible recursive locking detected
[  252.055056][    T1] 6.5.0-rc2-00590-gbb043828b2d4 #5 Not tainted
[  252.055056][    T1] --------------------------------------------
[  252.055056][    T1] swapper/1 is trying to acquire lock:
[ 252.055056][ T1] ffffc9000001f990 (ww_class_mutex){+.+.}-{0:0}, at: test_ww_mutex_init (kbuild/src/rand/kernel/locking/test-ww_mutex.c:77 kbuild/src/rand/kernel/locking/test-ww_mutex.c:632) 
[  252.055056][    T1]
[  252.055056][    T1] but task is already holding lock:
[ 252.055056][ T1] ffffc9000001f800 (ww_class_mutex){+.+.}-{0:0}, at: do_one_initcall (kbuild/src/rand/init/main.c:1232) 
[  252.055056][    T1]
[  252.055056][    T1] other info that might help us debug this:
[  252.055056][    T1]  Possible unsafe locking scenario:
[  252.055056][    T1]
[  252.055056][    T1]        CPU0
[  252.055056][    T1]        ----
[  252.055056][    T1]   lock(ww_class_mutex);
[  252.055056][    T1]
[  252.055056][    T1]  *** DEADLOCK ***
[  252.055056][    T1]
[  252.055056][    T1]  May be due to missing lock nesting notation
[  252.055056][    T1]
[  252.055056][    T1] 2 locks held by swapper/1:
[ 252.055056][ T1] #0: ffffc9000001f7d8 (ww_class_acquire){+.+.}-{0:0}, at: do_one_initcall (kbuild/src/rand/init/main.c:1232) 
[ 252.055056][ T1] #1: ffffc9000001f800 (ww_class_mutex){+.+.}-{0:0}, at: do_one_initcall (kbuild/src/rand/init/main.c:1232) 
[  252.055056][    T1]
[  252.055056][    T1] stack backtrace:
[  252.055056][    T1] CPU: 0 PID: 1 Comm: swapper Not tainted 6.5.0-rc2-00590-gbb043828b2d4 #5 9492b9dd86bdf82b2f3deb22196638d07aad10f2
[  252.055056][    T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[  252.055056][    T1] Call Trace:
[  252.055056][    T1]  <TASK>
[ 252.055056][ T1] dump_stack_lvl (kbuild/src/rand/lib/dump_stack.c:?) 
[ 252.055056][ T1] __lock_acquire (kbuild/src/rand/kernel/locking/lockdep.c:?) 
[ 252.055056][ T1] ? finish_lock_switch (kbuild/src/rand/arch/x86/include/asm/irqflags.h:42 kbuild/src/rand/arch/x86/include/asm/irqflags.h:77 kbuild/src/rand/kernel/sched/sched.h:1378 kbuild/src/rand/kernel/sched/core.c:5133) 
[ 252.055056][ T1] ? __schedule (kbuild/src/rand/kernel/sched/core.c:6718) 
[ 252.055056][ T1] lock_acquire (kbuild/src/rand/kernel/locking/lockdep.c:5761) 
[ 252.055056][ T1] ? test_ww_mutex_init (kbuild/src/rand/kernel/locking/test-ww_mutex.c:77 kbuild/src/rand/kernel/locking/test-ww_mutex.c:632) 
[ 252.055056][ T1] __mutex_lock_common (kbuild/src/rand/kernel/locking/mutex.c:603) 
[ 252.055056][ T1] ? test_ww_mutex_init (kbuild/src/rand/kernel/locking/test-ww_mutex.c:77 kbuild/src/rand/kernel/locking/test-ww_mutex.c:632) 
[ 252.055056][ T1] ? mark_lock (kbuild/src/rand/arch/x86/include/asm/bitops.h:228 kbuild/src/rand/arch/x86/include/asm/bitops.h:240 kbuild/src/rand/include/asm-generic/bitops/instrumented-non-atomic.h:142 kbuild/src/rand/kernel/locking/lockdep.c:228 kbuild/src/rand/kernel/locking/lockdep.c:4663) 
[ 252.055056][ T1] ? test_ww_mutex_init (kbuild/src/rand/kernel/locking/test-ww_mutex.c:77 kbuild/src/rand/kernel/locking/test-ww_mutex.c:632) 
[ 252.055056][ T1] ww_mutex_lock (kbuild/src/rand/kernel/locking/mutex.c:754 kbuild/src/rand/kernel/locking/mutex.c:871) 
[ 252.055056][ T1] test_ww_mutex_init (kbuild/src/rand/kernel/locking/test-ww_mutex.c:77 kbuild/src/rand/kernel/locking/test-ww_mutex.c:632) 
[ 252.055056][ T1] ? __asan_memcpy (kbuild/src/rand/mm/kasan/shadow.c:105) 
[ 252.055056][ T1] ? do_one_initcall (kbuild/src/rand/init/main.c:1232) 
[ 252.055056][ T1] ? __pfx_test_mutex_work (kbuild/src/rand/kernel/locking/test-ww_mutex.c:41) 
[ 252.055056][ T1] ? __pfx_test_ww_mutex_init (kbuild/src/rand/kernel/locking/test-ww_mutex.c:622) 
[ 252.055056][ T1] do_one_initcall (kbuild/src/rand/init/main.c:1232) 
[ 252.055056][ T1] ? __pfx_test_ww_mutex_init (kbuild/src/rand/kernel/locking/test-ww_mutex.c:622) 
[ 252.055056][ T1] do_initcall_level (kbuild/src/rand/init/main.c:1293) 
[ 252.055056][ T1] do_initcalls (kbuild/src/rand/init/main.c:1307) 
[ 252.055056][ T1] kernel_init_freeable (kbuild/src/rand/init/main.c:1550) 
[ 252.055056][ T1] ? __pfx_kernel_init (kbuild/src/rand/init/main.c:1429) 
[ 252.055056][ T1] kernel_init (kbuild/src/rand/init/main.c:1439) 
[ 252.055056][ T1] ? __pfx_kernel_init (kbuild/src/rand/init/main.c:1429) 
[ 252.055056][ T1] ret_from_fork (kbuild/src/rand/arch/x86/kernel/process.c:151) 
[ 252.055056][ T1] ? __pfx_kernel_init (kbuild/src/rand/init/main.c:1429) 
[ 252.055056][ T1] ret_from_fork_asm (kbuild/src/rand/arch/x86/entry/entry_64.S:298) 
[  252.055056][    T1] RIP: 0000:0x0
[ 252.055056][ T1] Code: Unable to access opcode bytes at 0xffffffffffffffd6.

Code starting with the faulting instruction
===========================================
[  252.055056][    T1] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[  252.055056][    T1] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[  252.055056][    T1] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[  252.055056][    T1] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[  252.055056][    T1] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[  252.055056][    T1] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[  252.055056][    T1]  </TASK>
[  258.685819][    T1] All ww mutex selftests passed


The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20230912/202309121305.81d349e5-oliver.sang@intel.com



-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


       reply	other threads:[~2023-09-12  5:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230911090729.5287-1-thomas.hellstrom@linux.intel.com>
2023-09-12  5:32 ` kernel test robot [this message]
2023-09-11  8:40 [RFC PATCH] locking/ww_mutex: Adjust to lockdep nest_lock requirements Thomas Hellström

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202309121305.81d349e5-oliver.sang@intel.com \
    --to=oliver.sang@intel.com \
    --cc=boqun.feng@gmail.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=longman@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mingo@redhat.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=peterz@infradead.org \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox