Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jul 2011 14:12:37 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r224521 - head/sys/kern
Message-ID:  <201107301412.p6UECbXe003297@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sat Jul 30 14:12:37 2011
New Revision: 224521
URL: http://svn.freebsd.org/changeset/base/224521

Log:
  Fix the devmtx lock leak from make_dev(9) when the old device cloning
  failed due to invalid or duplicated path being generated.
  
  Reviewed by:	jh
  Approved by:	re (kensmith)
  MFC after:	1 week

Modified:
  head/sys/kern/kern_conf.c

Modified: head/sys/kern/kern_conf.c
==============================================================================
--- head/sys/kern/kern_conf.c	Sat Jul 30 13:46:41 2011	(r224520)
+++ head/sys/kern/kern_conf.c	Sat Jul 30 14:12:37 2011	(r224521)
@@ -764,7 +764,8 @@ make_dev_credv(int flags, struct cdev **
 				LIST_REMOVE(dev, si_list);
 				dev_unlock();
 				devfs_free(dev);
-			}
+			} else
+				dev_unlock();
 			return (res);
 		}
 	}



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