Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jul 2002 11:25:27 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Julian Elischer <julian@elischer.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 13995 for review
Message-ID:  <XFMail.20020710112523.jhb@FreeBSD.org>
In-Reply-To: <Pine.BSF.4.21.0207091503180.35930-100000@InterJet.elischer.org>

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

On 09-Jul-2002 Julian Elischer wrote:
>  this looks "odd"

Unfortuantely user_ldt_free has a weird rule with sched_lock: it
drops it.  user_ldt_alloc() has a weirder one in that it drops it
if it returns NULL.

> ==== //depot/projects/smpng/sys/i386/i386/machdep.c#40 (text+ko) ====
> 
> @@ -825,8 +825,11 @@
>         struct trapframe *regs = td->td_frame;
>         struct pcb *pcb = td->td_pcb;
>  
> +       mtx_lock_spin(&sched_lock);
>         if (td->td_proc->p_md.md_ldt)
>                 user_ldt_free(td);
> +       else
> +               mtx_unlock_spin(&sched_lock);
>    
>         bzero((char *)regs, sizeof(struct trapframe));
>         regs->tf_eip = entry;
> 
> 
> does user_ldt_free(td) release the sched lock?
> 
> 
> 

-- 

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

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




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