DragonFly BSD
DragonFly bugs List (threaded) for 2010-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: [issue1777] vn panic: Freeing already free credential! 0xdef403f8


From: Joe Talbott <josepht@xxxxxxxxxx>
Date: Sat, 5 Jun 2010 00:29:34 -0400

I'm not sure this is the correct approach, but the attached patch
should fix this issue.

Joe
diff --git a/sys/dev/disk/vn/vn.c b/sys/dev/disk/vn/vn.c
index 95bcf44..9f45281 100644
--- a/sys/dev/disk/vn/vn.c
+++ b/sys/dev/disk/vn/vn.c
@@ -697,7 +697,7 @@ vnsetcred(struct vn_softc *vn, struct ucred *cred)
 	 * Set credits in our softc
 	 */
 
-	if (vn->sc_cred)
+	if (vn->sc_cred && vn->sc_cred->cr_ref > 0)
 		crfree(vn->sc_cred);
 	vn->sc_cred = crdup(cred);
 


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