Module Name:    src
Committed By:   martin
Date:           Sun Aug  4 11:12:10 UTC 2019

Modified Files:
        src/sys/fs/tmpfs [netbsd-8]: tmpfs_mem.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1321):

        sys/fs/tmpfs/tmpfs_mem.c: revision 1.10

Remove the roundups, they are incorrect and cause memcmp to wrongfully fail
because of uninitialized bytes at the end of the buffers.

ok rmind@


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.8.1 src/sys/fs/tmpfs/tmpfs_mem.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/tmpfs/tmpfs_mem.c
diff -u src/sys/fs/tmpfs/tmpfs_mem.c:1.9 src/sys/fs/tmpfs/tmpfs_mem.c:1.9.8.1
--- src/sys/fs/tmpfs/tmpfs_mem.c:1.9	Mon Aug 22 23:07:36 2016
+++ src/sys/fs/tmpfs/tmpfs_mem.c	Sun Aug  4 11:12:10 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_mem.c,v 1.9 2016/08/22 23:07:36 skrll Exp $	*/
+/*	$NetBSD: tmpfs_mem.c,v 1.9.8.1 2019/08/04 11:12:10 martin Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_mem.c,v 1.9 2016/08/22 23:07:36 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_mem.c,v 1.9.8.1 2019/08/04 11:12:10 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -234,8 +234,8 @@ tmpfs_strname_free(struct tmpfs_mount *m
 bool
 tmpfs_strname_neqlen(struct componentname *fcnp, struct componentname *tcnp)
 {
-	const size_t fln = roundup2(fcnp->cn_namelen, TMPFS_NAME_QUANTUM);
-	const size_t tln = roundup2(tcnp->cn_namelen, TMPFS_NAME_QUANTUM);
+	const size_t fln = fcnp->cn_namelen;
+	const size_t tln = tcnp->cn_namelen;
 
 	return (fln != tln) || memcmp(fcnp->cn_nameptr, tcnp->cn_nameptr, fln);
 }

Reply via email to