Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jul 2019 18:16:10 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r349662 - stable/12/sys/fs/cuse
Message-ID:  <201907031816.x63IGAUh024169@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Jul  3 18:16:10 2019
New Revision: 349662
URL: https://svnweb.freebsd.org/changeset/base/349662

Log:
  MFC r349368:
  Free all allocated unit IDs in cuse(3) after the client character
  devices have been destroyed to avoid creating character devices with
  identical name.
  
  Sponsored by:	Mellanox Technologies

Modified:
  stable/12/sys/fs/cuse/cuse.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/fs/cuse/cuse.c
==============================================================================
--- stable/12/sys/fs/cuse/cuse.c	Wed Jul  3 18:15:00 2019	(r349661)
+++ stable/12/sys/fs/cuse/cuse.c	Wed Jul  3 18:16:10 2019	(r349662)
@@ -671,14 +671,14 @@ cuse_server_unref(struct cuse_server *pcs)
 
 	TAILQ_REMOVE(&cuse_server_head, pcs, entry);
 
-	cuse_free_unit_by_id_locked(pcs, -1);
-
 	while ((pcsd = TAILQ_FIRST(&pcs->hdev)) != NULL) {
 		TAILQ_REMOVE(&pcs->hdev, pcsd, entry);
 		cuse_unlock();
 		cuse_server_free_dev(pcsd);
 		cuse_lock();
 	}
+
+	cuse_free_unit_by_id_locked(pcs, -1);
 
 	while ((mem = TAILQ_FIRST(&pcs->hmem)) != NULL) {
 		TAILQ_REMOVE(&pcs->hmem, mem, entry);



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