NetBSD-Bugs archive

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

kern/38271: uvm_reclaimable is not mp-safe



>Number:         38271
>Category:       kern
>Synopsis:       uvm_reclaimable is not mp-safe
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 21 06:15:00 +0000 2008
>Originator:     YAMAMOTO Takashi <yamt%mwd.biglobe.ne.jp@localhost>
>Release:        NetBSD 4.99.55
>Organization:
        
>Environment:
>Description:
        uvm_reclaimable() is used as the following.
        if another thread reclaims all reclaimable memory immediately after
        our alloc() is failed, we will goto fail possibly unnecessarily.

        p = alloc();
        if (p == NULL) {
                if (uvm_reclaimable()) {
                        uvm_wait();
                        goto retry;
                }
                goto fail;
        }
>How-To-Repeat:
        code inspection.
>Fix:

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index