David Malone <[EMAIL PROTECTED]> writes:
> On Sun, May 20, 2001 at 12:59:51PM -0400, Mike Heffner wrote:
> > The machine is up for about one minute and then I ran `startx' and the
> > screen turned black and it appeared to lockup, after about 30 seconds
> > plus some banging on the keyboard it rebooted. I have 256mb ram, so it
> > shouldn't be swapping at this point. The kernel and world are cvsupd
> > to about 12am May 20 EDT, the following is the panic message:
> I'm getting a panic whenever I start X too (with a kernel from
> earlier today). I managed to get a DDB trace from a serial console.

Please try the attached patch.  I make no claims of its correctness,
but this e-mail is coming to you via X on -current updated a few hours
ago so it works here :-).

I had to manually edit out some unrelated local changes, so if you
have trouble applying it fetch the full one from
http://www.unixfreak.org/~dima/home/shm-full.diff.  That one has local
changes (new sysctls), but they (probably) won't hurt you.


                                        Dima Dorfman
                                        [EMAIL PROTECTED]

Index: sysv_shm.c
RCS file: /stl/src/FreeBSD/src/sys/kern/sysv_shm.c,v
retrieving revision 1.56
diff -u -r1.56 sysv_shm.c
--- sysv_shm.c  2001/05/19 01:28:03     1.56
+++ sysv_shm.c  2001/05/20 20:26:28
@@ -182,7 +186,9 @@
        size_t size;
        shm_handle = shmseg->shm_internal;
+       mtx_lock(&vm_mtx);
+       mtx_unlock(&vm_mtx);
        free((caddr_t)shm_handle, M_SHM);
        shmseg->shm_internal = NULL;
        size = round_page(shmseg->shm_segsz);
@@ -203,7 +209,9 @@
        segnum = IPCID_TO_IX(shmmap_s->shmid);
        shmseg = &shmsegs[segnum];
        size = round_page(shmseg->shm_segsz);
+       mtx_lock(&vm_mtx);
        result = vm_map_remove(&p->p_vmspace->vm_map, shmmap_s->va, shmmap_s->va + 
+       mtx_unlock(&vm_mtx);
        if (result != KERN_SUCCESS)
                return EINVAL;
        shmmap_s->shmid = -1;

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to