Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/sys/fs/union Pull up following revision(s) (requested by ...
details: https://anonhg.NetBSD.org/src/rev/6bf11d090634
branches: netbsd-3
changeset: 577059:6bf11d090634
user: tron <tron%NetBSD.org@localhost>
date: Sun Aug 28 09:58:59 2005 +0000
description:
Pull up following revision(s) (requested by nakayama in ticket #708):
sys/fs/union/union_vfsops.c: revision 1.28
statvfs(2) returns bogus result from union mounted file systems with
`-r' option, since it uses uninitialized buffer in the case of no
lower-layer file system.
So, add M_ZERO to malloc(9) flags to initialize the buffer.
diffstat:
sys/fs/union/union_vfsops.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 38ef9f0b13b1 -r 6bf11d090634 sys/fs/union/union_vfsops.c
--- a/sys/fs/union/union_vfsops.c Sun Aug 28 09:57:50 2005 +0000
+++ b/sys/fs/union/union_vfsops.c Sun Aug 28 09:58:59 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: union_vfsops.c,v 1.25 2005/02/26 22:58:55 perry Exp $ */
+/* $NetBSD: union_vfsops.c,v 1.25.2.1 2005/08/28 09:58:59 tron Exp $ */
/*
* Copyright (c) 1994 The Regents of the University of California.
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.25 2005/02/26 22:58:55 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.25.2.1 2005/08/28 09:58:59 tron Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -482,7 +482,7 @@
{
int error;
struct union_mount *um = MOUNTTOUNIONMOUNT(mp);
- struct statvfs *sbuf = malloc(sizeof(*sbuf), M_TEMP, M_WAITOK);
+ struct statvfs *sbuf = malloc(sizeof(*sbuf), M_TEMP, M_WAITOK | M_ZERO);
unsigned long lbsize;
#ifdef UNION_DIAGNOSTIC
Home |
Main Index |
Thread Index |
Old Index