Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3-0]: src/sys/kern Pull up following revision(s) (requested by si...



details:   https://anonhg.NetBSD.org/src/rev/51b7699743ec
branches:  netbsd-3-0
changeset: 579232:51b7699743ec
user:      tron <tron%NetBSD.org@localhost>
date:      Wed May 31 21:20:42 2006 +0000

description:
Pull up following revision(s) (requested by simonb in ticket #1347):
        sys/kern/vfs_vnops.c: revision 1.112
Limit the size of any kernel buffers allocated by the VOP_READDIR
routines to MAXBSIZE.

diffstat:

 sys/kern/vfs_vnops.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 289b5b70e146 -r 51b7699743ec sys/kern/vfs_vnops.c
--- a/sys/kern/vfs_vnops.c      Tue May 30 19:47:00 2006 +0000
+++ b/sys/kern/vfs_vnops.c      Wed May 31 21:20:42 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_vnops.c,v 1.86.2.10 2005/11/09 12:25:15 tron Exp $ */
+/*     $NetBSD: vfs_vnops.c,v 1.86.2.10.2.1 2006/05/31 21:20:42 tron Exp $     */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.86.2.10 2005/11/09 12:25:15 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.86.2.10.2.1 2006/05/31 21:20:42 tron Exp $");
 
 #include "opt_verified_exec.h"
 
@@ -422,6 +422,9 @@
        struct uio auio;
        int error, eofflag;
 
+       /* Limit the size on any kernel buffers used by VOP_READDIR */
+       count = min(MAXBSIZE, count);
+
 unionread:
        if (vp->v_type != VDIR)
                return (EINVAL);



Home | Main Index | Thread Index | Old Index