Source-Changes-HG archive

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

[src/trunk]: src/sys/compat remove incorrect assertions (the len passed is th...



details:   https://anonhg.NetBSD.org/src/rev/35b10bd4853c
branches:  trunk
changeset: 771289:35b10bd4853c
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Nov 18 15:45:47 2011 +0000

description:
remove incorrect assertions (the len passed is the size of the bsd structure
not the linux one)

diffstat:

 sys/compat/linux/common/linux_signal.c     |  6 ++----
 sys/compat/linux32/common/linux32_signal.c |  7 ++-----
 2 files changed, 4 insertions(+), 9 deletions(-)

diffs (76 lines):

diff -r 2e71657021f9 -r 35b10bd4853c sys/compat/linux/common/linux_signal.c
--- a/sys/compat/linux/common/linux_signal.c    Fri Nov 18 10:06:56 2011 +0000
+++ b/sys/compat/linux/common/linux_signal.c    Fri Nov 18 15:45:47 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_signal.c,v 1.73 2011/11/18 04:07:44 christos Exp $       */
+/*     $NetBSD: linux_signal.c,v 1.74 2011/11/18 15:45:47 christos Exp $       */
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.73 2011/11/18 04:07:44 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.74 2011/11/18 15:45:47 christos Exp $");
 
 #define COMPAT_LINUX 1
 
@@ -559,7 +559,6 @@
        int error;
        linux_sigset_t lss;
        
-       KASSERT(len == sizeof(lss));
        if ((error = copyin(u, &lss, sizeof(lss))) != 0)
                return error;
 
@@ -573,7 +572,6 @@
        int error;
        struct linux_timespec lts;
        
-       KASSERT(len == sizeof(lts));
        if ((error = copyin(u, &lts, sizeof(lts))) != 0)
                return error;
 
diff -r 2e71657021f9 -r 35b10bd4853c sys/compat/linux32/common/linux32_signal.c
--- a/sys/compat/linux32/common/linux32_signal.c        Fri Nov 18 10:06:56 2011 +0000
+++ b/sys/compat/linux32/common/linux32_signal.c        Fri Nov 18 15:45:47 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux32_signal.c,v 1.14 2011/11/18 04:08:56 christos Exp $ */
+/*     $NetBSD: linux32_signal.c,v 1.15 2011/11/18 15:46:29 christos Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_signal.c,v 1.14 2011/11/18 04:08:56 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_signal.c,v 1.15 2011/11/18 15:46:29 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/ucred.h>
@@ -438,7 +438,6 @@
        int error;
        linux32_sigset_t lss;
        
-       KASSERT(len == sizeof(lss));
        if ((error = copyin(u, &lss, sizeof(lss))) != 0)
                return error;
 
@@ -452,7 +451,6 @@
        int error;
        struct linux32_timespec lts;
        
-       KASSERT(len == sizeof(lts));
        if ((error = copyin(u, &lts, sizeof(lts))) != 0)
                return error;
 
@@ -472,7 +470,6 @@
 {
        linux32_siginfo_t lsi;
 
-       KASSERT(len == sizeof(lsi));
 
        native_to_linux32_siginfo(&lsi, &((const siginfo_t *)s)->_info);
        return copyout(&lsi, u, sizeof(lsi));



Home | Main Index | Thread Index | Old Index