Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/fs/tmpfs Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/4726f5d492a7
branches:  netbsd-8
changeset: 453748:4726f5d492a7
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Aug 04 11:12:10 2019 +0000

description:
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@

diffstat:

 sys/fs/tmpfs/tmpfs_mem.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r e4b86427aad3 -r 4726f5d492a7 sys/fs/tmpfs/tmpfs_mem.c
--- a/sys/fs/tmpfs/tmpfs_mem.c  Sun Aug 04 11:08:51 2019 +0000
+++ b/sys/fs/tmpfs/tmpfs_mem.c  Sun Aug 04 11:12:10 2019 +0000
@@ -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 @@
 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);
 }



Home | Main Index | Thread Index | Old Index