Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/ffs ffs_superblock_validate - check fs_old_size too.



details:   https://anonhg.NetBSD.org/src/rev/930cbe9985c9
branches:  trunk
changeset: 320780:930cbe9985c9
user:      uwe <uwe%NetBSD.org@localhost>
date:      Wed Jul 18 22:40:56 2018 +0000

description:
ffs_superblock_validate - check fs_old_size too.

Now I can mount OpenWindows Version 3 CD from 1991.

diffstat:

 sys/ufs/ffs/ffs_vfsops.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r d12cd4538dd0 -r 930cbe9985c9 sys/ufs/ffs/ffs_vfsops.c
--- a/sys/ufs/ffs/ffs_vfsops.c  Wed Jul 18 17:57:00 2018 +0000
+++ b/sys/ufs/ffs/ffs_vfsops.c  Wed Jul 18 22:40:56 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ffs_vfsops.c,v 1.357 2018/05/28 21:04:38 chs Exp $     */
+/*     $NetBSD: ffs_vfsops.c,v 1.358 2018/07/18 22:40:56 uwe Exp $     */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.357 2018/05/28 21:04:38 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.358 2018/07/18 22:40:56 uwe Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -971,7 +971,7 @@
         * XXX: these values are just zero-checked to prevent obvious
         * bugs. We need more strict checks.
         */
-       if (fs->fs_size == 0)
+       if (fs->fs_size == 0 && fs->fs_old_size == 0)
                return 0;
        if (fs->fs_cssize == 0)
                return 0;



Home | Main Index | Thread Index | Old Index