Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Fix bad assertion: vfs_suspend(dead_rootmount) may ...



details:   https://anonhg.NetBSD.org/src/rev/96fd8921fc2d
branches:  trunk
changeset: 997087:96fd8921fc2d
user:      hannken <hannken%NetBSD.org@localhost>
date:      Thu Feb 21 08:52:53 2019 +0000

description:
Fix bad assertion: vfs_suspend(dead_rootmount) may happen and
must return EOPNOTSUPP.

diffstat:

 sys/kern/vfs_trans.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 9faca1034ad9 -r 96fd8921fc2d sys/kern/vfs_trans.c
--- a/sys/kern/vfs_trans.c      Thu Feb 21 08:25:00 2019 +0000
+++ b/sys/kern/vfs_trans.c      Thu Feb 21 08:52:53 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_trans.c,v 1.54 2019/02/20 10:09:45 hannken Exp $   */
+/*     $NetBSD: vfs_trans.c,v 1.55 2019/02/21 08:52:53 hannken Exp $   */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_trans.c,v 1.54 2019/02/20 10:09:45 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_trans.c,v 1.55 2019/02/21 08:52:53 hannken Exp $");
 
 /*
  * File system transaction operations.
@@ -677,7 +677,8 @@
        struct fstrans_lwp_info *fli;
        int error;
 
-       KASSERT(mp != dead_rootmount);
+       if (mp == dead_rootmount)
+               return EOPNOTSUPP;
 
        fli = fstrans_get_lwp_info(mp, true);
        mp = fli->fli_mount;



Home | Main Index | Thread Index | Old Index