NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PR/46153 CVS commit: src/sys/kern



The following reply was made to PR kern/46153; it has been noted by GNATS.

From: Manuel Bouyer <bouyer%antioche.eu.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: martin%NetBSD.org@localhost, gnats-admin%NetBSD.org@localhost, 
netbsd-bugs%NetBSD.org@localhost
Subject: Re: PR/46153 CVS commit: src/sys/kern
Date: Sat, 10 Mar 2012 15:00:01 +0100

 On Sat, Mar 10, 2012 at 02:39:27PM +0100, Manuel Bouyer wrote:
 > db{2}> tr
 > pmap_deactivate() at netbsd:pmap_deactivate+0x93
 > mi_switch() at netbsd:mi_switch+0x2c5
 > kpreempt() at netbsd:kpreempt+0xe2
 > Xpreemptrecurse() at netbsd:Xpreemptrecurse+0x15
 > spawn_return() at netbsd:spawn_return+0x1eb
 
 BTW,
 (gdb) l *(spawn_return+0x1eb)
 0xffffffff804bfe4d is in spawn_return 
(/dsk/l1/misc/bouyer/quota2/src/sys/kern/kern_exec.c:1917).
 1912             * of spawn_data again), signal parent and exit this process.
 1913             */
 1914            mutex_enter(&spawn_data->sed_mtx_child);
 1915            spawn_data->sed_error = error;
 1916            cv_signal(&spawn_data->sed_cv_child_ready);
 1917            mutex_exit(&spawn_data->sed_mtx_child);
 1918            mutex_enter(l->l_proc->p_lock);
 1919            exit1(l, W_EXITCODE(error, SIGABRT));
 1920    }
 
 and we have:
  report_error:
         if (have_reflock)
                 rw_exit(&l->l_proc->p_reflock);
 
         /* stop using kernel vmspace (if we haven't already) */
         if (l->l_proc->p_vmspace) {   
                 KPREEMPT_DISABLE(l);  
                 pmap_deactivate(l);  
                 l->l_proc->p_vmspace = NULL;
                 KPREEMPT_ENABLE(l);  
         }
 
 I guess KPREEMPT_ENABLE() should not be there (as we now have a NULL vmspace)
 but I don't know where we should put it, or if it should be there at
 all (as we're about to exit()).
 
 I just removed it, and all tests in tests/lib/libc/gen/posix_spawn pass.
 
 -- 
 Manuel Bouyer <bouyer%antioche.eu.org@localhost>
      NetBSD: 26 ans d'experience feront toujours la difference
 --
 


Home | Main Index | Thread Index | Old Index