NetBSD-Bugs archive

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

kern/38537: __HAVE_PREEMPTION requires MULTIPROCESSOR



>Number:         38537
>Category:       kern
>Synopsis:       __HAVE_PREEMPTION requires MULTIPROCESSOR
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 29 05:55:00 +0000 2008
>Originator:     Andrew Doran
>Release:        4.99.62
>Organization:
The NetBSD Project
>Environment:
n/a
>Description:
kpreempt uses kernel_lock to determine whether a section of code is 
multi-thread safe and so can be prempted.

On x86, we patch out the kernel_lock functions to do nothing if
a system has a single CPU.

So !MULTIPROCESSOR and __HAVE_PREEMPTION are incompatible at least on x86.
On a single CPU system, code blocks that should hold kernel_lock could
be preempted.

>How-To-Repeat:
Code inspection.
>Fix:
Refine the kernel_lock functions or make MULTIPROCESSOR mandatory
on x86.



Home | Main Index | Thread Index | Old Index