Subject: CVS commit: [nathanw_sa] syssrc/sys
To: None <source-changes@netbsd.org>
From: Jason R Thorpe <thorpej@netbsd.org>
List: source-changes
Date: 11/27/2001 06:35:34
Module Name:	syssrc
Committed By:	thorpej
Date:		Tue Nov 27 04:35:33 UTC 2001

Modified Files:
	syssrc/sys/kern [nathanw_sa]: kern_sa.c
	syssrc/sys/sys [nathanw_sa]: savar.h

Log Message:
Fix a scheduler locking protocol error:
- sa_switch() is called with sched_lock held, and sched_lock must
  remain held right up to the mi_switch() call.  When mi_switch()
  returns, sched_lock will be unlocked.
- Because sched_lock is held (and can't be released), we CANNOT
  sleep waiting for memory (this makes sense, since we're in the
  guts of ltsleep(), here).  Deal with this by pre-allocating the
  sadata_upcall structure (with waitok == 0) and passing it to the
  new sa_upcall0() function.  XXX This is not pretty, folks.  We
  need to look for a better solution to this problem.

Problem reported by Allen Briggs.


To generate a diff of this commit:
cvs rdiff -r1.1.2.8 -r1.1.2.9 syssrc/sys/kern/kern_sa.c
cvs rdiff -r1.1.2.7 -r1.1.2.8 syssrc/sys/sys/savar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.