[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210222072855.GA15592@xsang-OptiPlex-9020>
Date: Mon, 22 Feb 2021 15:28:55 +0800
From: kernel test robot <oliver.sang@...el.com>
To: Jaroslav Kysela <perex@...ex.cz>
Cc: 0day robot <lkp@...el.com>, LKML <linux-kernel@...r.kernel.org>,
lkp@...ts.01.org, ALSA development <alsa-devel@...a-project.org>,
Takashi Iwai <tiwai@...e.de>,
Hans de Goede <hdegoede@...hat.com>,
Perry Yuan <Perry.Yuan@...l.com>
Subject: [ALSA] a7fc56df5a:
WARNING:possible_circular_locking_dependency_detected
Greeting,
FYI, we noticed the following commit (built with gcc-9):
commit: a7fc56df5a000d97b1b201a3f8a59218fba1ee49 ("[PATCH 4/5] ALSA: HDA - remove the custom implementation for the audio LED trigger")
url: https://github.com/0day-ci/linux/commits/Jaroslav-Kysela/ALSA-control-add-generic-LED-trigger-code/20210211-192035
base: https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git for-next
in testcase: kernel-selftests
version: kernel-selftests-x86_64-b553cffa-1_20210122
with following parameters:
group: group-02
ucode: 0xe2
test-description: The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel.
test-url: https://www.kernel.org/doc/Documentation/kselftest.txt
on test machine: 4 threads Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz with 32G memory
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <oliver.sang@...el.com>
[ 43.984220] WARNING: possible circular locking dependency detected
[ 43.990344] 5.11.0-rc4-00124-ga7fc56df5a00 #1 Not tainted
[ 43.995694] ------------------------------------------------------
[ 44.001816] kworker/3:3/257 is trying to acquire lock:
[ 44.006908] ffff888816929718 (&card->controls_rwsem){++++}-{3:3}, at: snd_ctl_led_set_state (kbuild/src/consumer/sound/core/control_led.c:96 kbuild/src/consumer/sound/core/control_led.c:140) snd_ctl_led
[ 44.017421]
[ 44.017421] but task is already holding lock:
[ 44.023196] ffffffffc006d0a8 (snd_ctl_led_mutex){+.+.}-{3:3}, at: snd_ctl_led_set_state (kbuild/src/consumer/sound/core/control_led.c:124) snd_ctl_led
[ 44.033281]
[ 44.033281] which lock already depends on the new lock.
[ 44.033281]
[ 44.041382]
[ 44.041382] the existing dependency chain (in reverse order) is:
[ 44.048795]
[ 44.048795] -> #2 (snd_ctl_led_mutex){+.+.}-{3:3}:
[ 44.055006] __lock_acquire (kbuild/src/consumer/kernel/locking/lockdep.c:4832)
[ 44.059326] lock_acquire (kbuild/src/consumer/kernel/locking/lockdep.c:437 kbuild/src/consumer/kernel/locking/lockdep.c:5439 kbuild/src/consumer/kernel/locking/lockdep.c:5402)
[ 44.063385] __mutex_lock (kbuild/src/consumer/arch/x86/include/asm/atomic64_64.h:22 kbuild/src/consumer/include/asm-generic/atomic-instrumented.h:838 kbuild/src/consumer/include/asm-generic/atomic-long.h:29 kbuild/src/consumer/kernel/locking/mutex.c:111 kbuild/src/consumer/kernel/locking/mutex.c:152 kbuild/src/consumer/kernel/locking/mutex.c:958 kbuild/src/consumer/kernel/locking/mutex.c:1103)
[ 44.067443] snd_ctl_led_set_state (kbuild/src/consumer/sound/core/control_led.c:124) snd_ctl_led
[ 44.073481] snd_ctl_notify_one (kbuild/src/consumer/sound/core/control.c:206 (discriminator 3)) snd
[ 44.078578] __snd_ctl_add_replace (kbuild/src/consumer/sound/core/control.c:407 (discriminator 3)) snd
[ 44.084018] snd_ctl_add_replace (kbuild/src/consumer/sound/core/control.c:426) snd
[ 44.089115] snd_hda_ctl_add (kbuild/src/consumer/sound/pci/hda/hda_codec.c:1678) snd_hda_codec
[ 44.094730] snd_hda_add_new_ctls (kbuild/src/consumer/sound/pci/hda/hda_codec.c:3315) snd_hda_codec
[ 44.100861] snd_hda_gen_build_controls (kbuild/src/consumer/sound/pci/hda/hda_generic.c:5151) snd_hda_codec_generic
[ 44.108278] alc_build_controls (kbuild/src/consumer/sound/pci/hda/patch_realtek.c:839) snd_hda_codec_realtek
[ 44.114748] snd_hda_codec_build_controls (kbuild/src/consumer/sound/pci/hda/hda_codec.c:3028) snd_hda_codec
[ 44.121568] hda_codec_driver_probe (kbuild/src/consumer/sound/pci/hda/hda_bind.c:120) snd_hda_codec
[ 44.127871] really_probe (kbuild/src/consumer/drivers/base/dd.c:565)
[ 44.132018] driver_probe_device (kbuild/src/consumer/drivers/base/dd.c:745)
[ 44.136675] device_driver_attach (kbuild/src/consumer/drivers/base/dd.c:1020)
[ 44.141334] __driver_attach (kbuild/src/consumer/drivers/base/dd.c:1099)
[ 44.145652] bus_for_each_dev (kbuild/src/consumer/drivers/base/bus.c:305)
[ 44.149969] bus_add_driver (kbuild/src/consumer/drivers/base/bus.c:623)
[ 44.154286] driver_register (kbuild/src/consumer/drivers/base/driver.c:171)
[ 44.158520] do_one_initcall (kbuild/src/consumer/init/main.c:1217)
[ 44.162847] do_init_module (kbuild/src/consumer/kernel/module.c:3672)
[ 44.167086] load_module (kbuild/src/consumer/kernel/module.c:4043)
[ 44.171326] __do_sys_finit_module (kbuild/src/consumer/kernel/module.c:4133)
[ 44.176170] do_syscall_64 (kbuild/src/consumer/arch/x86/entry/common.c:46)
[ 44.180245] entry_SYSCALL_64_after_hwframe (kbuild/src/consumer/arch/x86/entry/entry_64.S:127)
[ 44.185777]
[ 44.185777] -> #1 (snd_ctl_layer_rwsem){++++}-{3:3}:
[ 44.192165] __lock_acquire (kbuild/src/consumer/kernel/locking/lockdep.c:4832)
[ 44.196483] lock_acquire (kbuild/src/consumer/kernel/locking/lockdep.c:437 kbuild/src/consumer/kernel/locking/lockdep.c:5439 kbuild/src/consumer/kernel/locking/lockdep.c:5402)
[ 44.200543] down_read (kbuild/src/consumer/arch/x86/include/asm/atomic64_64.h:160 kbuild/src/consumer/include/asm-generic/atomic-instrumented.h:893 kbuild/src/consumer/include/asm-generic/atomic-long.h:65 kbuild/src/consumer/kernel/locking/rwsem.c:237 kbuild/src/consumer/kernel/locking/rwsem.c:1212 kbuild/src/consumer/kernel/locking/rwsem.c:1222 kbuild/src/consumer/kernel/locking/rwsem.c:1355)
[ 44.204345] snd_ctl_notify_one (kbuild/src/consumer/sound/core/control.c:206) snd
[ 44.209441] __snd_ctl_add_replace (kbuild/src/consumer/sound/core/control.c:407 (discriminator 3)) snd
[ 44.214879] snd_ctl_add_replace (kbuild/src/consumer/sound/core/control.c:426) snd
[ 44.219975] snd_hda_ctl_add (kbuild/src/consumer/sound/pci/hda/hda_codec.c:1678) snd_hda_codec
[ 44.225590] snd_hda_add_new_ctls (kbuild/src/consumer/sound/pci/hda/hda_codec.c:3315) snd_hda_codec
[ 44.231722] snd_hda_gen_build_controls (kbuild/src/consumer/sound/pci/hda/hda_generic.c:5151) snd_hda_codec_generic
[ 44.239138] alc_build_controls (kbuild/src/consumer/sound/pci/hda/patch_realtek.c:839) snd_hda_codec_realtek
[ 44.245610] snd_hda_codec_build_controls (kbuild/src/consumer/sound/pci/hda/hda_codec.c:3028) snd_hda_codec
[ 44.252430] hda_codec_driver_probe (kbuild/src/consumer/sound/pci/hda/hda_bind.c:120) snd_hda_codec
[ 44.258732] really_probe (kbuild/src/consumer/drivers/base/dd.c:565)
[ 44.262877] driver_probe_device (kbuild/src/consumer/drivers/base/dd.c:745)
[ 44.267540] device_driver_attach (kbuild/src/consumer/drivers/base/dd.c:1020)
[ 44.272204] __driver_attach (kbuild/src/consumer/drivers/base/dd.c:1099)
[ 44.276523] bus_for_each_dev (kbuild/src/consumer/drivers/base/bus.c:305)
[ 44.280839] bus_add_driver (kbuild/src/consumer/drivers/base/bus.c:623)
[ 44.285156] driver_register (kbuild/src/consumer/drivers/base/driver.c:171)
[ 44.289390] do_one_initcall (kbuild/src/consumer/init/main.c:1217)
[ 44.293709] do_init_module (kbuild/src/consumer/kernel/module.c:3672)
[ 44.297940] load_module (kbuild/src/consumer/kernel/module.c:4043)
[ 44.302175] __do_sys_finit_module (kbuild/src/consumer/kernel/module.c:4133)
[ 44.307010] do_syscall_64 (kbuild/src/consumer/arch/x86/entry/common.c:46)
[ 44.311071] entry_SYSCALL_64_after_hwframe (kbuild/src/consumer/arch/x86/entry/entry_64.S:127)
[ 44.316594]
[ 44.316594] -> #0 (&card->controls_rwsem){++++}-{3:3}:
[ 44.323148] check_prev_add (kbuild/src/consumer/kernel/locking/lockdep.c:2869)
[ 44.327380] validate_chain (kbuild/src/consumer/kernel/locking/lockdep.c:2994 kbuild/src/consumer/kernel/locking/lockdep.c:3608)
[ 44.331782] __lock_acquire (kbuild/src/consumer/kernel/locking/lockdep.c:4832)
[ 44.336099] lock_acquire (kbuild/src/consumer/kernel/locking/lockdep.c:437 kbuild/src/consumer/kernel/locking/lockdep.c:5439 kbuild/src/consumer/kernel/locking/lockdep.c:5402)
[ 44.340157] down_read (kbuild/src/consumer/arch/x86/include/asm/atomic64_64.h:160 kbuild/src/consumer/include/asm-generic/atomic-instrumented.h:893 kbuild/src/consumer/include/asm-generic/atomic-long.h:65 kbuild/src/consumer/kernel/locking/rwsem.c:237 kbuild/src/consumer/kernel/locking/rwsem.c:1212 kbuild/src/consumer/kernel/locking/rwsem.c:1222 kbuild/src/consumer/kernel/locking/rwsem.c:1355)
[ 44.343959] snd_ctl_led_set_state (kbuild/src/consumer/sound/core/control_led.c:96 kbuild/src/consumer/sound/core/control_led.c:140) snd_ctl_led
[ 44.350083] snd_ctl_led_register (kbuild/src/consumer/sound/core/control_led.c:224 (discriminator 3)) snd_ctl_led
[ 44.355947] snd_ctl_dev_register (kbuild/src/consumer/sound/core/control.c:2117 (discriminator 3)) snd
[ 44.361128] __snd_device_register+0x1b/0x40 snd
[ 44.366996] snd_device_register_all (kbuild/src/consumer/sound/core/device.c:198) snd
[ 44.372433] snd_card_register (kbuild/src/consumer/sound/core/init.c:775) snd
[ 44.377441] azx_probe_continue (kbuild/src/consumer/sound/pci/hda/hda_intel.c:2345) snd_hda_intel
[ 44.383393] process_one_work (kbuild/src/consumer/arch/x86/include/asm/jump_label.h:25 kbuild/src/consumer/include/linux/jump_label.h:200 kbuild/src/consumer/include/trace/events/workqueue.h:108 kbuild/src/consumer/kernel/workqueue.c:2280)
[ 44.387882] worker_thread (kbuild/src/consumer/include/linux/list.h:282 kbuild/src/consumer/kernel/workqueue.c:2422)
[ 44.392025] kthread (kbuild/src/consumer/kernel/kthread.c:292)
[ 44.395740] ret_from_fork (kbuild/src/consumer/arch/x86/entry/entry_64.S:302)
[ 44.399808]
[ 44.399808] other info that might help us debug this:
[ 44.399808]
[ 44.407745] Chain exists of:
[ 44.407745] &card->controls_rwsem --> snd_ctl_layer_rwsem --> snd_ctl_led_mutex
[ 44.407745]
[ 44.419479] Possible unsafe locking scenario:
[ 44.419479]
[ 44.425350] CPU0 CPU1
[ 44.429838] ---- ----
[ 44.434326] lock(snd_ctl_led_mutex);
[ 44.438043] lock(snd_ctl_layer_rwsem);
[ 44.444424] lock(snd_ctl_led_mutex);
[ 44.450633] lock(&card->controls_rwsem);
[ 44.454690]
To reproduce:
git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp install job.yaml # job file is attached in this email
bin/lkp split-job --compatible job.yaml
bin/lkp run compatible-job.yaml
Thanks,
Oliver Sang
View attachment "config-5.11.0-rc4-00124-ga7fc56df5a00" of type "text/plain" (212561 bytes)
View attachment "job-script" of type "text/plain" (6879 bytes)
Download attachment "dmesg.xz" of type "application/x-xz" (1418316 bytes)
View attachment "kernel-selftests" of type "text/plain" (93232 bytes)
View attachment "job.yaml" of type "text/plain" (5977 bytes)
View attachment "reproduce" of type "text/plain" (520 bytes)
Powered by blists - more mailing lists