NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/48592: cpufreq_get_state_index() unlock wrong lock



>Number:         48592
>Category:       kern
>Synopsis:       cpufreq_get_state_index() unlock wrong lock
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 12 08:50:00 +0000 2014
>Originator:     Kengo NAKAHARA
>Release:        current
>Organization:
>Environment:
NetBSD dtrace-test.iij.ad.jp 6.1.2 NetBSD 6.1.2 (DTRACE) #101: Wed Feb 12 
00:09:46 UTC 2014  
k-nakahara%dtrace-test.iij.ad.jp@localhost:/home/k-nakahara/netbsd_src/6.1.2/usr/obj/sys/arch/amd64/compile/DTRACE
 amd64
>Description:
cpufreq_get_state_index() lock "cpufreq_lock", but unlock "cpu_lock".

>How-To-Repeat:

>Fix:
--- kern/subr_cpufreq.c.orig    2014-02-12 08:44:27.000000000 +0000
+++ kern/subr_cpufreq.c 2014-02-12 08:44:42.000000000 +0000
@@ -361,7 +361,7 @@
        }
 
        if (index >= cf->cf_state_count) {
-               mutex_exit(&cpu_lock);
+               mutex_exit(&cpufreq_lock);
                return EINVAL;
        }
 



Home | Main Index | Thread Index | Old Index