Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Suspend file system before unmounting in mount_domo...
details: https://anonhg.NetBSD.org/src/rev/ebf72285c31a
branches: trunk
changeset: 940670:ebf72285c31a
user: hannken <hannken%NetBSD.org@localhost>
date: Tue Oct 13 13:15:39 2020 +0000
description:
Suspend file system before unmounting in mount_domount() error path
to prevent diagnostic assertions from unmount/flush.
Reported-by: syzbot+8d557f49c8b7888182eb%syzkaller.appspotmail.com@localhost
Reported-by: syzbot+e87fe1e769a3426d9bf3%syzkaller.appspotmail.com@localhost
Reported-by: syzbot+9c5b86e651e98c5bf438%syzkaller.appspotmail.com@localhost
Reported-by: syzbot+610b614af0d66179ca78%syzkaller.appspotmail.com@localhost
Reported-by: syzbot+7818ff113a1535ebc724%syzkaller.appspotmail.com@localhost
diffstat:
sys/kern/vfs_mount.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 0b627c053e3b -r ebf72285c31a sys/kern/vfs_mount.c
--- a/sys/kern/vfs_mount.c Tue Oct 13 11:28:32 2020 +0000
+++ b/sys/kern/vfs_mount.c Tue Oct 13 13:15:39 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_mount.c,v 1.83 2020/05/23 23:42:43 ad Exp $ */
+/* $NetBSD: vfs_mount.c,v 1.84 2020/10/13 13:15:39 hannken Exp $ */
/*-
* Copyright (c) 1997-2020 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.83 2020/05/23 23:42:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.84 2020/10/13 13:15:39 hannken Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -832,8 +832,11 @@
return error;
err_mounted:
+ if (vfs_suspend(mp, 0))
+ panic("Suspending fresh file system failed");
if (VFS_UNMOUNT(mp, MNT_FORCE) != 0)
panic("Unmounting fresh file system failed");
+ vfs_resume(mp);
err_unmounted:
vp->v_mountedhere = NULL;
Home |
Main Index |
Thread Index |
Old Index