lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Mon, 10 Aug 2020 08:22:34 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>
Cc:     LKML <linux-kernel@...r.kernel.org>, lkp@...ts.01.org
Subject: [cpufreq] d203ef0dcb:
 WARNING:possible_circular_locking_dependency_detected

Greeting,

FYI, we noticed the following commit (built with gcc-9):

commit: d203ef0dcbacc3a3ae1b41cea1b8b72face55704 ("cpufreq: intel_pstate: Implement passive mode with HWP enabled")
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master


in testcase: kernel-selftests
with following parameters:

	group: kselftests-cpufreq
	ucode: 0xdc

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: 8 threads Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz with 16G 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 <lkp@...el.com>


[   48.078152] WARNING: possible circular locking dependency detected
[   48.084624] 5.8.0-rc5-00027-gd203ef0dcbacc #1 Tainted: G          I      
[   48.091702] ------------------------------------------------------
[   48.098235] main.sh/1263 is trying to acquire lock:
[   48.103417] ffffffff82ec7f08 (intel_pstate_driver_lock){+.+.}-{3:3}, at: store_energy_performance_preference+0xec/0x250
[   48.114475] 
[   48.114475] but task is already holding lock:
[   48.121057] ffff88810775cb80 (&policy->rwsem){++++}-{3:3}, at: store+0x69/0xa0
[   48.128584] 
[   48.128584] which lock already depends on the new lock.
[   48.128584] 
[   48.137870] 
[   48.137870] the existing dependency chain (in reverse order) is:
[   48.146026] 
[   48.146026] -> #2 (&policy->rwsem){++++}-{3:3}:
[   48.152689]        __lock_acquire+0x538/0xa90
[   48.157348]        lock_acquire+0xab/0x390
[   48.161752]        down_write+0x38/0x70
[   48.165970]        store+0x69/0xa0
[   48.169670]        kernfs_fop_write+0xdc/0x1c0
[   48.174410]        vfs_write+0xee/0x220
[   48.178547]        ksys_write+0x68/0xe0
[   48.182687]        do_syscall_64+0x52/0xb0
[   48.187198]        entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   48.193098] 
[   48.193098] -> #1 (cpu_hotplug_lock){++++}-{0:0}:
[   48.199960]        __lock_acquire+0x538/0xa90
[   48.204636]        lock_acquire+0xab/0x390
[   48.209146]        cpus_read_lock+0x39/0xd0
[   48.213656]        cpufreq_register_driver+0xb6/0x2a0
[   48.219118]        intel_pstate_register_driver+0x42/0xb0
[   48.224890]        intel_pstate_init+0x457/0x4c4
[   48.229956]        do_one_initcall+0x5d/0x330
[   48.234653]        kernel_init_freeable+0x248/0x2c9
[   48.239933]        kernel_init+0xa/0x112
[   48.243954] RESULT_ROOT=/result/kernel-selftests/kselftests-cpufreq-ucode=0xdc/lkp-skl-d01/debian-10.4-x86_64-20200603.cgz/x86_64-rhel-7.6-kselftests/gcc-9/d203ef0dcbacc3a3ae1b41cea1b8b72face55704/3
[   48.243956] 
[   48.244207]        ret_from_fork+0x22/0x30
[   48.244208] 
[   48.244208] -> #0 (intel_pstate_driver_lock){+.+.}-{3:3}:
[   48.266422] job=/lkp/jobs/scheduled/lkp-skl-d01/kernel-selftests-kselftests-cpufreq-ucode=0xdc-debian-10.4-x86_64-20200603.cgz-d203ef0dcbacc3a3ae1b41cea1b8b72face55704-20200809-28154-vptfq5-1.yaml
[   48.266424] 
[   48.269230]        check_prev_add+0x8e/0x9f0
[   48.269231]        validate_chain+0x79b/0x1080
[   48.269231]        __lock_acquire+0x538/0xa90
[   48.269233]        lock_acquire+0xab/0x390
[   48.316522]        __mutex_lock+0xac/0x9c0
[   48.321142]        store_energy_performance_preference+0xec/0x250
[   48.327686]        store+0x7c/0xa0
[   48.331564]        kernfs_fop_write+0xdc/0x1c0
[   48.336533]        vfs_write+0xee/0x220
[   48.340897]        ksys_write+0x68/0xe0
[   48.345261]        do_syscall_64+0x52/0xb0
[   48.349900]        entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   48.355983] 
[   48.355983] other info that might help us debug this:
[   48.355983] 
[   48.365539] Chain exists of:
[   48.365539]   intel_pstate_driver_lock --> cpu_hotplug_lock --> &policy->rwsem
[   48.365539] 
[   48.378769]  Possible unsafe locking scenario:
[   48.378769] 
[   48.385730]        CPU0                    CPU1
[   48.390746]        ----                    ----
[   48.395816]   lock(&policy->rwsem);
[   48.399818]                                lock(cpu_hotplug_lock);
[   48.406450]                                lock(&policy->rwsem);
[   48.412935]   lock(intel_pstate_driver_lock);
[   48.417768] 
[   48.417768]  *** DEADLOCK ***
[   48.417768] 
[   48.425132] 5 locks held by main.sh/1263:
[   48.429578]  #0: ffff8882e5f38438 (sb_writers#4){.+.+}-{0:0}, at: vfs_write+0x1ba/0x220
[   48.438068]  #1: ffff8884550d6288 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write+0xa5/0x1c0
[   48.446893]  #2: ffff8882cfcf42a8 (kn->active#156){.+.+}-{0:0}, at: kernfs_fop_write+0xad/0x1c0
[   48.456102]  #3: ffffffff82c73a70 (cpu_hotplug_lock){++++}-{0:0}, at: store+0x26/0xa0
[   48.464370]  #4: ffff88810775cb80 (&policy->rwsem){++++}-{3:3}, at: store+0x69/0xa0
[   48.472470] 
[   48.472470] stack backtrace:
[   48.477844] CPU: 0 PID: 1263 Comm: main.sh Tainted: G          I       5.8.0-rc5-00027-gd203ef0dcbacc #1
[   48.487799] Hardware name: Dell Inc. OptiPlex 7040/0Y7WYT, BIOS 1.2.8 01/26/2016
[   48.495665] Call Trace:
[   48.498622]  dump_stack+0x96/0xd0
[   48.502441]  check_noncircular+0x162/0x180
[   48.507124]  ? __lock_acquire+0x538/0xa90
[   48.511635]  check_prev_add+0x8e/0x9f0
[   48.515977]  validate_chain+0x79b/0x1080
[   48.520415]  __lock_acquire+0x538/0xa90
[   48.524791]  lock_acquire+0xab/0x390
[   48.528936]  ? store_energy_performance_preference+0xec/0x250
[   48.535217]  __mutex_lock+0xac/0x9c0
[   48.539313]  ? store_energy_performance_preference+0xec/0x250
[   48.545551]  ? store_energy_performance_preference+0xec/0x250
[   48.551822]  ? sscanf+0x4e/0x70
[   48.555470]  ? store_energy_performance_preference+0xec/0x250
[   48.561707]  store_energy_performance_preference+0xec/0x250
[   48.567808]  store+0x7c/0xa0
[   48.571279]  kernfs_fop_write+0xdc/0x1c0
[   48.575701]  vfs_write+0xee/0x220
[   48.579494]  ksys_write+0x68/0xe0
[   48.583324]  do_syscall_64+0x52/0xb0


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 run     job.yaml



Thanks,
lkp


View attachment "config-5.8.0-rc5-00027-gd203ef0dcbacc" of type "text/plain" (209046 bytes)

View attachment "job-script" of type "text/plain" (6358 bytes)

View attachment "dmesg" of type "text/plain" (115821 bytes)

View attachment "kernel-selftests" of type "text/plain" (804 bytes)

View attachment "job.yaml" of type "text/plain" (5481 bytes)

View attachment "reproduce" of type "text/plain" (170 bytes)

Powered by blists - more mailing lists