On Mon, Oct 27, 2008 at 06:56:21PM +0100, Christoph Egger wrote: > Bill Stouder-Studenmund wrote: > > Module Name: src > > Committed By: wrstuden > > Date: Mon Oct 27 16:52:04 UTC 2008 > > > > Modified Files: > > src/sys/compat/sa: compat_sa.c > > > > Log Message: > > Ok. Some calls to sa_upcall() pass in an 'l' that is not the current > > lwp. Our "no-upcall" flagging however accesses l_pflag, and so we > > can't access l->l_pflag. So access curlwp for the no-upcall-blocking > > part. > > > > > > To generate a diff of this commit: > > cvs rdiff -r1.4 -r1.5 src/sys/compat/sa/compat_sa.c > > > > Please note that diffs are not public domain; they are subject to the > > copyright notices on the relevant files. > > If you want to be kernel preemptible safe, you must cache curlwp. Huh? How could this use of curlwp change? I want the context that the code currently is running in. While I understand I could get preempted, won't I have to come back to the context I was in in order to resume? If curlwp really can change in any of (well, just one of) the places that will call sa_upcall(), the correct answer is to disable preemption. The whole point of this change is to prevent BLOCKED upcalls from what we're doing. Take care, Bill
Attachment:
pgpIncLdw6rru.pgp
Description: PGP signature