NetBSD-Bugs archive

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

kern/39025: deadlocks between psets, cpu offline, cpu affinity

>Number:         39025
>Category:       kern
>Synopsis:       deadlocks between psets, cpu offline, cpu affinity
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 22 21:45:00 +0000 2008
>Originator:     Andrew Doran
>Release:        4.99.64
The NetBSD Project
root can deadlock the system by making CPU time unavailable to apps.

Create a processor set with 1 CPU, assign LWPs to it and take the CPU
offline with cpuctl. The LWPs can hold kernel resources like locks.
Without the ability to run and release the resources they could cause
the system to deadlock.

Code inspection.
I'm working on a patch. Short term:

- If a cpu is taken off line, remove it from its processor set.

- If an entire processor set is off lined, migrate its LWPs to the
  default processor set.

- Implement cpu off line using a fake processor set.

- Special case temporary off line for suspend/resume. If the system is
  suspending, block all processor set modifications until it has resumed.

- Prevent mixing of processor sets and Linux-style affinity masks somehow.

Home | Main Index | Thread Index | Old Index