Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Apr 2003 14:50:44 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        David Xu <davidxu@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   RE: cvs commit: src/sys/i386/i386 trap.c
Message-ID:  <XFMail.20030422145044.jhb@FreeBSD.org>
In-Reply-To: <200304220745.h3M7jljW086690@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 22-Apr-2003 David Xu wrote:
> davidxu     2003/04/22 00:45:47 PDT
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/i386/i386        trap.c 
>   Log:
>   Fix some problems for cpu_switch_load_gs. when fault address is at
>   cpu_switch_load_gs, cpu is in context switch, so don't enable interrupt.
>   because it is in context switch, it is expected sched_lock was held,
>   so don't PROC_LOCK(p) and psignal, it is LOR, probably we can
>   set a P_XSIGBUS like flag in p_sflags, and set TDF_ASTPENDING in
>   td_flags, in ast(), post a SIGBUS to process if P_XSIGBUS was set.

If we are in cpu_switch(), then PCPU_GET(spinlocks) should not be NULL.
Oh, hmm, that only works when witness is on. :(  Probably that should
be 'td->td_critnest != 0'.  That should remove the need for the eip
check at least.

Using an ast flag for to defer the SIGBUS might be the best thing to
do in that case, yes.

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030422145044.jhb>