NetBSD-Bugs archive

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

kern/41374: getnewvnode deadlock

>Number:         41374
>Category:       kern
>Synopsis:       getnewvnode deadlock
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 07 04:45:00 +0000 2009
>Originator:     YAMAMOTO Takashi <>
>Release:        NetBSD 5.99.11

System: NetBSD kaeru 5.99.11
Architecture: i386
Machine: i386

        a thread doing getcleanvnode:
        pick a vnode
        acqure v_interlock
        call vclean

                now, another thread doing cache_lookup:
                picks the vnode
                vtryget succeed
                vn_lock succeed

        now in vclean:
        set VI_XLOCK (too late to be noticed by the competing thread)
        wait on the vnode lock (this might violate locking order)

        code inspection.

        in the case of getcleanvnode,
        set VI_XLOCK before incrementing v_usecount?


Home | Main Index | Thread Index | Old Index