NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/43590: rump mount process does not detach on netbsd-5
>Number: 43590
>Category: kern
>Synopsis: rump mount process does not detach on netbsd-5
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jul 09 19:40:01 +0000 2010
>Originator: Matthew Mondor
>Release: NetBSD 5.1_RC3
>Organization:
>Environment:
System: NetBSD behemoth.xisop 5.1_RC3 NetBSD 5.1_RC3 (GENERIC_MM) #0: Fri Jul 9
02:43:35 EDT 2010
root%behemoth.xisop@localhost:/usr/obj/sys/arch/i386/compile/GENERIC_MM i386
Architecture: i386
Machine: i386
>Description:
Although umount(8) is able to automatically kill the corresponding rump
process, if any, on netbsd-5 rump_*(8) mount commands do not fork(2).
I would suggest a pullup of of revision 1.6 of src/lib/libp2k/p2k.c to
netbsd-5 which should fix this issue.
>How-To-Repeat:
Use say, the following command:
$ /usr/sbin/rump_cd9660 -o ro,nodev,nosuid /dev/cd0a ~/cdrom/
(hangs, showing that appending & would have been useful)
or add an fstab entry as follows:
/dev/cd0a /cdrom cd9660
ro,noauto,rump,nodev,nosuid
And try the following command:
# mount /cdrom
(also hangs)
>Fix:
Index: lib/libp2k/p2k.c
===================================================================
RCS file: /nfs/ginseng/home/data/cvsup/netbsd/src/lib/libp2k/p2k.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- lib/libp2k/p2k.c 7 Oct 2008 23:14:58 -0000 1.5
+++ lib/libp2k/p2k.c 14 Nov 2008 13:43:20 -0000 1.6
@@ -1,4 +1,4 @@
-/* $NetBSD: p2k.c,v 1.5 2008/10/07 23:14:58 pooka Exp $ */
+/* $NetBSD: p2k.c,v 1.6 2008/11/14 13:43:20 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@@ -144,6 +144,7 @@
struct ukfs *ukfs;
extern int puffs_fakecc;
int rv, sverrno;
+ bool dodaemon;
rv = -1;
if (ukfs_init() == -1)
@@ -188,10 +189,17 @@
PUFFSOP_SET(pops, p2k, node, inactive);
PUFFSOP_SET(pops, p2k, node, reclaim);
+ dodaemon = true;
+ if (getenv("P2K_DEBUG") != NULL) {
+ puffs_flags |= PUFFS_FLAG_OPDUMP;
+ dodaemon = false;
+ }
+
strcpy(typebuf, "p2k|");
if (strcmp(vfsname, "puffs") == 0) { /* XXX */
struct puffs_kargs *args = arg;
strlcat(typebuf, args->pa_typename, sizeof(typebuf));
+ dodaemon = false;
} else {
strlcat(typebuf, vfsname, sizeof(typebuf));
}
@@ -209,6 +217,9 @@
puffs_set_prepost(pu, makelwp, clearlwp);
+ if (dodaemon)
+ puffs_daemon(pu, 1, 1);
+
if ((rv = puffs_mount(pu, mountpath, mntflags, rvp))== -1)
goto out;
rv = puffs_mainloop(pu);
Home |
Main Index |
Thread Index |
Old Index