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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 20 Aug 2013 23:34:00 +0800
From:	Fengguang Wu <fengguang.wu@...el.com>
To:	fengguang.wu@...el.com,
	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>
Cc:	Viresh Kumar <viresh.kumar@...aro.org>, cpufreq@...r.kernel.org,
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [cpufreq] swapper/1 is trying to release lock cpufreq_rwsem at
 cpufreq_add_dev()

Greetings,

I got the below dmesg and the first bad commit is

commit 6eed9404ab3c4baea54ce4c7e862e69df1d39f38
Author: Viresh Kumar <viresh.kumar@...aro.org>
Date:   Tue Aug 6 22:53:11 2013 +0530

    cpufreq: Use rwsem for protecting critical sections
    
    Critical sections of the cpufreq core are protected with the help of
    the driver module owner's refcount, which isn't the correct approach,
    because it causes rmmod to return an error when some routine has
    updated that refcount.
    
    Let's use rwsem for this purpose instead.  Only
    cpufreq_unregister_driver() will use write sem
    and everybody else will use read sem.
    
    [rjw: Subject & changelog]
    Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>


[   21.664908] 3.11.0-rc5-next-20130816-05970-g1e712b0 #17 Not tainted
[   21.664908] -------------------------------------
[   21.664908] swapper/1 is trying to release lock (cpufreq_rwsem) at:
[   21.664908] [<ffffffff8164fa12>] cpufreq_add_dev+0x232/0x360
[   21.664908] but there are no more locks to release!
[   21.664908] 
[   21.664908] other info that might help us debug this:
[   21.664908] 1 lock held by swapper/1:
[   21.664908]  #0:  (subsys mutex){+.+.+.}, at: [<ffffffff813e26a4>] subsys_interface_register+0x54/0xf0
[   21.664908] 
[   21.664908] stack backtrace:
[   21.664908] CPU: 0 PID: 1 Comm: swapper Not tainted 3.11.0-rc5-next-20130816-05970-g1e712b0 #17
[   21.664908]  ffffffff8164fa12 ffff88000dc63ce8 ffffffff81886d70 ffff88000dc63d10
[   21.664908]  ffffffff810c755c ffffffff81d66b50 ffff88000dc59040 ffffffff8164fa12
[   21.664908]  ffff88000dc63d88 ffffffff810cbf56 ffffffff810c8430 000000070dc63d68
[   21.664908] Call Trace:
[   21.664908]  [<ffffffff8164fa12>] ? cpufreq_add_dev+0x232/0x360
[   21.664908]  [<ffffffff81886d70>] dump_stack+0x19/0x1b
[   21.664908]  [<ffffffff810c755c>] print_unlock_imbalance_bug+0xec/0x100
[   21.664908]  [<ffffffff8164fa12>] ? cpufreq_add_dev+0x232/0x360
[   21.664908]  [<ffffffff810cbf56>] lock_release_non_nested+0x226/0x300
[   21.664908]  [<ffffffff810c8430>] ? mark_held_locks+0xb0/0x130
[   21.664908]  [<ffffffff81130489>] ? kfree+0xe9/0x140
[   21.664908]  [<ffffffff8164fa12>] ? cpufreq_add_dev+0x232/0x360
[   21.664908]  [<ffffffff810cc0b8>] lock_release+0x88/0x1b0
[   21.664908]  [<ffffffff810ae60a>] up_read+0x1a/0x40
[   21.664908]  [<ffffffff8164fa12>] cpufreq_add_dev+0x232/0x360
[   21.664908]  [<ffffffff813e26f9>] subsys_interface_register+0xa9/0xf0
[   21.664908]  [<ffffffff81650f34>] cpufreq_register_driver+0x84/0x130
[   21.664908]  [<ffffffff81de4f9d>] ? cpufreq_gov_dbs_init+0x12/0x12
[   21.664908]  [<ffffffff81de4fee>] acpi_cpufreq_init+0x51/0x134
[   21.664908]  [<ffffffff81dac003>] do_one_initcall+0x8c/0x138
[   21.664908]  [<ffffffff810a8b18>] ? parse_args+0x1f8/0x330
[   21.664908]  [<ffffffff81dac1c2>] kernel_init_freeable+0x113/0x18e
[   21.664908]  [<ffffffff81dab860>] ? do_early_param+0x88/0x88
[   21.664908]  [<ffffffff8187f390>] ? rest_init+0x150/0x150
[   21.664908]  [<ffffffff8187f399>] kernel_init+0x9/0x180
[   21.664908]  [<ffffffff818a0dba>] ret_from_fork+0x7a/0xb0
[   21.664908]  [<ffffffff8187f390>] ? rest_init+0x150/0x150
[   21.689085] BIOS EDD facility v0.16 2004-Jun-25, 6 devices found
[   21.758668] Freeing unused kernel memory: 772K (ffffffff81dab000 - ffffffff81e6c000)

git bisect start 233035a7f291ea27aec280270bc05293da3b0e7c v3.10 --
git bisect good 496322bc91e35007ed754184dcd447a02b6dd685  # 19:57     60+  Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
git bisect  bad 1be61c8552a7fb4b1f3229b25bfaa2f1ae834730  # 20:04      0-  Merge remote-tracking branch 'slave-dma/next'
git bisect good 549f3a1218ba18fcde11ef0e22b07e6365645788  # 20:17     60+  Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
git bisect good 3227db39cc40b6d933ef8629094feb9ce1a0492e  # 20:27     60+  Merge remote-tracking branch 'net/master'
git bisect good 978ff9279fad8d3eeef71062b268f0da429d619a  # 20:32     60+  Merge remote-tracking branch 'vfs/for-next'
git bisect good 164aa191a5625d5fe37e01cfc13849f87910c676  # 20:56     60+  Merge remote-tracking branch 'libata/for-next'
git bisect good 84a55797049fbbb7d8da9fe3e664c7dc96601fa5  # 21:17     60+  Merge branch 'pm-cpuidle'
git bisect  bad 832a373ea2343d616ec769e7939f7eb6810713aa  # 21:22      0-  Merge branch 'fixes-next' into linux-next
git bisect  bad b678c5d3074d55cb49d7cc96875d04bd47ae847e  # 21:28      0-  Merge branch 'pm-sleep' into linux-next
git bisect good 1133bfa6dcf034639486982629d29472737d5e96  # 21:41     60+  Merge branch 'pm-cpufreq-ondemand' into pm-cpufreq
git bisect good fe492f3f0332e23cc6ca4913e5a2ed78e1888902  # 21:46     60+  cpufreq: Fix broken usage of governor->owner's refcount
git bisect  bad 3de9bdeb28638e164d1f0eb38dd68e3f5d2ac95c  # 21:53      0-  cpufreq: improve error checking on return values of __cpufreq_governor()
git bisect  bad adc97d6a735dbb1e94cb4f1bf0b55f258b349941  # 21:57      0-  cpufreq: Drop the owner field from struct cpufreq_driver
git bisect  bad 6eed9404ab3c4baea54ce4c7e862e69df1d39f38  # 22:01      0-  cpufreq: Use rwsem for protecting critical sections
git bisect good fe492f3f0332e23cc6ca4913e5a2ed78e1888902  # 22:24    180+  cpufreq: Fix broken usage of governor->owner's refcount
git bisect  bad 1e712b0818569846d6b926ecb6bf32b3dea73609  # 22:24      0-  Add linux-next specific files for 20130816
git bisect good fd3930f70c8d14008f3377d51ce039806dfc542e  # 23:14    180+  proc: more readdir conversion bug-fixes
git bisect  bad d7949dff8fd98d8dd7ee46a8b1a089fe80099869  # 23:19      0-  Add linux-next specific files for 20130820

Thanks,
Fengguang

View attachment "dmesg-kvm-ant-19071-20130818122323--" of type "text/plain" (42177 bytes)

View attachment "bisect-1e712b0818569846d6b926ecb6bf32b3dea73609-x86_64-randconfig-a06-0818-BUG:-bad-unlock-balance-detected-93225.log" of type "text/plain" (51290 bytes)

View attachment "config-3.11.0-rc5-next-20130816-05970-g1e712b0" of type "text/plain" (73908 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ