Subject: port-sparc64/37468: sparc64 trap/interrupt handling and kernel_lock
To: None <,,>
From: None <>
List: netbsd-bugs
Date: 12/03/2007 10:35:00
>Number:         37468
>Category:       port-sparc64
>Synopsis:       sparc64 trap/interrupt handling and kernel_lock
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-sparc64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 03 10:35:00 +0000 2007
>Originator:     Andrew Doran
>Release:        4.99.39
The NetBSD Project
The interrupt path on sparc64 doesn't seem to acquire kernel_lock.
Also the trap handler doesn't acquire it before calling uvm_fault().

Code inspection.
For interrupts: acquire kernel_lock for interrupts registered at IPL_VM.

For trap handling: acquire kernel_lock before calling into UVM, or wait
until the vmlocking branch is merged into -current and do nothing.