Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/ptyfs forgot to commit one patch:
details: https://anonhg.NetBSD.org/src/rev/22c9ec6ed2d4
branches: trunk
changeset: 328140:22c9ec6ed2d4
user: christos <christos%NetBSD.org@localhost>
date: Thu Mar 27 21:13:06 2014 +0000
description:
forgot to commit one patch:
Avoid returning released(free), but still hashed inode numbers.
(Ilya Zykov)
diffstat:
sys/fs/ptyfs/ptyfs_vnops.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r 2c064d63ebe5 -r 22c9ec6ed2d4 sys/fs/ptyfs/ptyfs_vnops.c
--- a/sys/fs/ptyfs/ptyfs_vnops.c Thu Mar 27 21:09:33 2014 +0000
+++ b/sys/fs/ptyfs/ptyfs_vnops.c Thu Mar 27 21:13:06 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ptyfs_vnops.c,v 1.44 2014/03/21 17:21:53 christos Exp $ */
+/* $NetBSD: ptyfs_vnops.c,v 1.45 2014/03/27 21:13:06 christos Exp $ */
/*
* Copyright (c) 1993, 1995
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.44 2014/03/21 17:21:53 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.45 2014/03/27 21:13:06 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -616,7 +616,8 @@
pty = atoi(pname, cnp->cn_namelen);
- if (pty < 0 || pty >= npty || pty_isfree(pty, 1))
+ if (pty < 0 || pty >= npty || pty_isfree(pty, 1) ||
+ ptyfs_used_get(PTYFSptc, pty, dvp->v_mount, 0) == NULL)
break;
error = ptyfs_allocvp(dvp->v_mount, vpp, PTYFSpts, pty,
@@ -711,7 +712,8 @@
}
for (; uio->uio_resid >= UIO_MX && i < npty; i++) {
/* check for used ptys */
- if (ptyfs_used_get(PTYFSptc, i - 2, vp->v_mount, 0) == NULL)
+ if (pty_isfree(i - 2, 1) ||
+ ptyfs_used_get(PTYFSptc, i - 2, vp->v_mount, 0) == NULL)
continue;
dp->d_fileno = PTYFS_FILENO(i - 2, PTYFSpts);
Home |
Main Index |
Thread Index |
Old Index