Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Nov 2013 21:16:53 +0000 (UTC)
From:      John-Mark Gurney <jmg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r258402 - head/sys/ufs/ffs
Message-ID:  <201311202116.rAKLGrdB073402@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jmg
Date: Wed Nov 20 21:16:53 2013
New Revision: 258402
URL: http://svnweb.freebsd.org/changeset/base/258402

Log:
  fix a use after free, jsegdep_merge will free wk, avoid the next check...
  
  CID:		1006098
  Sponsored by:	Imaginary Forces
  Reviewed by:	mckusick
  MFC after:	1 week

Modified:
  head/sys/ufs/ffs/ffs_softdep.c

Modified: head/sys/ufs/ffs/ffs_softdep.c
==============================================================================
--- head/sys/ufs/ffs/ffs_softdep.c	Wed Nov 20 21:05:33 2013	(r258401)
+++ head/sys/ufs/ffs/ffs_softdep.c	Wed Nov 20 21:16:53 2013	(r258402)
@@ -1096,7 +1096,7 @@ jwork_move(dst, src)
 	LIST_FOREACH_SAFE(wk, dst, wk_list, wkn) {
 		if (wk->wk_type == D_JSEGDEP)
 			jsegdep = jsegdep_merge(WK_JSEGDEP(wk), jsegdep);
-		if (wk->wk_type == D_FREEDEP)
+		else if (wk->wk_type == D_FREEDEP)
 			freedep = freedep_merge(WK_FREEDEP(wk), freedep);
 	}
 



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