NetBSD-Bugs archive

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

kern/38222: setrunnable: locking misuse /documentation issue.

>Number:         38222
>Category:       kern
>Synopsis:       setrunnable: locking misuse /documentation issue.
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 11 15:30:00 +0000 2008
>Originator:     Mindaugas Rasiukevicius <rmind at NetBSD org>
>Release:        NetBSD 4.99.55
        setrunnable() function in kern_synch.c assumes that l->l_mutex can be
        l->l_cpu->ci_schedstate.spc_mutex. According to locking documentation,
        threads in LSSTOP, LSSUSPENDED or LSSLEEP cannot hold the lock. However,
        <ad> has noted, this is/may be wrong. References:

        Note, there were no reports, that following KASSERT has fired:

        Thus, assumption in setrunnable() looks wrong for me.

        Code inspection.
        Locking documentation or code must be fixed.

Home | Main Index | Thread Index | Old Index