Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libukfs Give rump_sys_unmount() in ukfs_release() a curl...
details: https://anonhg.NetBSD.org/src/rev/f30e9042a2eb
branches: trunk
changeset: 747721:f30e9042a2eb
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Sep 29 11:17:00 2009 +0000
description:
Give rump_sys_unmount() in ukfs_release() a curlwp context. This
prevents use-after-free and should fix crashy cases reported by
Arnaud Ysmal.
diffstat:
lib/libukfs/ukfs.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (19 lines):
diff -r 1e53e82e1b36 -r f30e9042a2eb lib/libukfs/ukfs.c
--- a/lib/libukfs/ukfs.c Tue Sep 29 11:01:39 2009 +0000
+++ b/lib/libukfs/ukfs.c Tue Sep 29 11:17:00 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ukfs.c,v 1.35 2009/08/04 12:37:14 pooka Exp $ */
+/* $NetBSD: ukfs.c,v 1.36 2009/09/29 11:17:00 pooka Exp $ */
/*
* Copyright (c) 2007, 2008 Antti Kantee. All Rights Reserved.
@@ -308,7 +308,9 @@
mntflag = 0;
if (flags & UKFS_RELFLAG_FORCE)
mntflag = MNT_FORCE;
+ rump_setup_curlwp(nextpid(fs), 1, 1);
rv = rump_sys_unmount(fs->ukfs_mountpath, mntflag);
+ rump_clear_curlwp();
if (rv) {
ukfs_chdir(fs, fs->ukfs_mountpath);
errno = rv;
Home |
Main Index |
Thread Index |
Old Index