Date: Wed, 3 Jul 2019 18:16:52 +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-11@freebsd.org Subject: svn commit: r349663 - stable/11/sys/fs/cuse Message-ID: <201907031816.x63IGqlD024253@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Wed Jul 3 18:16:52 2019 New Revision: 349663 URL: https://svnweb.freebsd.org/changeset/base/349663 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/11/sys/fs/cuse/cuse.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/cuse/cuse.c ============================================================================== --- stable/11/sys/fs/cuse/cuse.c Wed Jul 3 18:16:10 2019 (r349662) +++ stable/11/sys/fs/cuse/cuse.c Wed Jul 3 18:16:52 2019 (r349663) @@ -673,14 +673,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.x63IGqlD024253>