The branch main has been updated by mjg:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=3bc17248d31794519ba95b2c6b9ff8a0d31dba81

commit 3bc17248d31794519ba95b2c6b9ff8a0d31dba81
Author:     Mateusz Guzik <m...@freebsd.org>
AuthorDate: 2021-02-08 22:10:57 +0000
Commit:     Mateusz Guzik <m...@freebsd.org>
CommitDate: 2021-02-09 01:54:21 +0000

    devfs: fix use count leak when using TIOCSCTTY
    
    by matching devfs_ctty_ref
    
    Fixes: 3b44443626603f65 ("devfs: rework si_usecount to track opens")
---
 sys/fs/devfs/devfs_vnops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c
index 983bfc803999..043cee74fde2 100644
--- a/sys/fs/devfs/devfs_vnops.c
+++ b/sys/fs/devfs/devfs_vnops.c
@@ -974,7 +974,7 @@ devfs_ioctl(struct vop_ioctl_args *ap)
 
                /* Get rid of reference to old control tty */
                if (vpold)
-                       vrele(vpold);
+                       devfs_ctty_unref(vpold);
        }
        return (error);
 }
_______________________________________________
dev-commits-src-main@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"

Reply via email to