PERFORCE change 107430 for review

Roman Divacky rdivacky at FreeBSD.org
Sat Oct 7 10:14:56 PDT 2006


http://perforce.freebsd.org/chv.cgi?CH=107430

Change 107430 by rdivacky at rdivacky_witten on 2006/10/07 17:14:07

	Fix use-after-free. I want to refcount the new undo struct.
	
	Noticed by: netchild

Affected files ...

.. //depot/projects/linuxolator/src/sys/kern/sysv_sem.c#5 edit

Differences ...

==== //depot/projects/linuxolator/src/sys/kern/sysv_sem.c#5 (text+ko) ====

@@ -1272,10 +1272,10 @@
 	refcount_release(&p->p_semundo->refcount);
 	if (p->p_semundo->refcount == 0)
    	   	free(p->p_semundo, M_SEM);
-	refcount_acquire(&p->p_semundo->refcount);
 	PROC_LOCK(p);
 	p->p_semundo = SLIST_NEXT(suptr, un_next);
 	PROC_UNLOCK(p);
+	refcount_acquire(&p->p_semundo->refcount);
 }
 
 static int


More information about the p4-projects mailing list