Source-Changes-HG archive

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

[src/netbsd-7]: src/sys/compat/netbsd32 Pull up following revision(s) (reques...



details:   https://anonhg.NetBSD.org/src/rev/0a3cb9ca3f15
branches:  netbsd-7
changeset: 798696:0a3cb9ca3f15
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Dec 12 19:12:08 2014 +0000

description:
Pull up following revision(s) (requested by maxv in ticket #314):
        sys/compat/netbsd32/netbsd32_compat_30.c: revision 1.31
User-triggerable kmem_alloc(0).
Ok martin@ christos@
User

diffstat:

 sys/compat/netbsd32/netbsd32_compat_30.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 5c7927d9a00a -r 0a3cb9ca3f15 sys/compat/netbsd32/netbsd32_compat_30.c
--- a/sys/compat/netbsd32/netbsd32_compat_30.c  Fri Dec 12 19:07:46 2014 +0000
+++ b/sys/compat/netbsd32/netbsd32_compat_30.c  Fri Dec 12 19:12:08 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_compat_30.c,v 1.30 2010/04/23 15:19:20 rmind Exp $    */
+/*     $NetBSD: netbsd32_compat_30.c,v 1.30.34.1 2014/12/12 19:12:08 martin Exp $      */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_30.c,v 1.30 2010/04/23 15:19:20 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_30.c,v 1.30.34.1 2014/12/12 19:12:08 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -78,6 +78,9 @@
                error = EBADF;
                goto out;
        }
+       if (count == 0)
+               goto out;
+
        buf = kmem_alloc(count, KM_SLEEP);
        error = vn_readdir(fp, buf, UIO_SYSSPACE, count, &done, l, 0, 0);
        if (error == 0) {



Home | Main Index | Thread Index | Old Index