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/45f01052a37b
branches:  trunk
changeset: 839469:45f01052a37b
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 26a5bd4c05cc -r 45f01052a37b 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