* umount(/proc) after CLONE_NEWNS in 2.6.25?
@ 2008-04-28 17:30 Michael Tokarev
2008-04-28 18:27 ` Al Viro
0 siblings, 1 reply; 6+ messages in thread
From: Michael Tokarev @ 2008-04-28 17:30 UTC (permalink / raw)
To: Linux-kernel
Since 2.6.25, it isn't possible anymore to umount
/proc after clone(CLONE_NEWNS). It worked fine
before. E.g:
# strace newnamespace umount -n /proc
2.6.24:
[pid 30121] clone(child_stack=0xff8c21f4, flags=CLONE_NEWNS|SIGCHLD) = 30122
[pid 30122] execve("/usr/sbin/umount", ["umount", "-n", "/proc"])
...
[pid 30122] oldumount("/proc") = 0
2.6.25:
[pid 6308] clone(child_stack=0xbfc9de94, flags=CLONE_NEWNS|SIGCHLD) = 6309
[pid 6309] execve("/usr/sbin/umount", ["umount", "-n", "/proc"])
...
[pid 6309] oldumount("/proc") = -1 EBUSY (Device or resource busy)
umount: /proc: device is busy
Yes, various NAMESPACEs are enabled (i'm trying to experiment with
those).
Is it intentional?
Thanks.
/mjt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: umount(/proc) after CLONE_NEWNS in 2.6.25?
2008-04-28 17:30 umount(/proc) after CLONE_NEWNS in 2.6.25? Michael Tokarev
@ 2008-04-28 18:27 ` Al Viro
2008-04-29 1:47 ` Al Viro
0 siblings, 1 reply; 6+ messages in thread
From: Al Viro @ 2008-04-28 18:27 UTC (permalink / raw)
To: Michael Tokarev; +Cc: Linux-kernel
On Mon, Apr 28, 2008 at 09:30:13PM +0400, Michael Tokarev wrote:
> [pid 6308] clone(child_stack=0xbfc9de94, flags=CLONE_NEWNS|SIGCHLD) = 6309
> [pid 6309] execve("/usr/sbin/umount", ["umount", "-n", "/proc"])
> ...
> [pid 6309] oldumount("/proc") = -1 EBUSY (Device or resource busy)
> umount: /proc: device is busy
>
> Yes, various NAMESPACEs are enabled (i'm trying to experiment with
> those).
>
> Is it intentional?
It's very odd. Could you bisect that down to offending changeset or
at least narrow the things down to -rc<something>? I'm going down right
now, so won't be able to look into that until tonight...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: umount(/proc) after CLONE_NEWNS in 2.6.25?
2008-04-28 18:27 ` Al Viro
@ 2008-04-29 1:47 ` Al Viro
2008-04-29 2:06 ` Al Viro
0 siblings, 1 reply; 6+ messages in thread
From: Al Viro @ 2008-04-29 1:47 UTC (permalink / raw)
To: Michael Tokarev; +Cc: Linux-kernel
On Mon, Apr 28, 2008 at 07:27:59PM +0100, Al Viro wrote:
> > [pid 6308] clone(child_stack=0xbfc9de94, flags=CLONE_NEWNS|SIGCHLD) = 6309
> > [pid 6309] execve("/usr/sbin/umount", ["umount", "-n", "/proc"])
> > ...
> > [pid 6309] oldumount("/proc") = -1 EBUSY (Device or resource busy)
> > umount: /proc: device is busy
> >
> > Yes, various NAMESPACEs are enabled (i'm trying to experiment with
> > those).
> >
> > Is it intentional?
>
> It's very odd. Could you bisect that down to offending changeset or
> at least narrow the things down to -rc<something>? I'm going down right
> now, so won't be able to look into that until tonight...
Check the version of umount(8) you've got. And see if that strace happens
to have open of /proc/mounts, without matching close by the time it calls
umount(). util-linux-ng 2.13.1 is _that_ dumb...
Please, make sure that you are using the same userland for testing - with
aforementioned version of umount(8) behaviour is triggered with .24 as well
as with .25 and there's nothing kernel could do about that...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: umount(/proc) after CLONE_NEWNS in 2.6.25?
2008-04-29 1:47 ` Al Viro
@ 2008-04-29 2:06 ` Al Viro
2008-04-29 2:12 ` Al Viro
0 siblings, 1 reply; 6+ messages in thread
From: Al Viro @ 2008-04-29 2:06 UTC (permalink / raw)
To: Michael Tokarev; +Cc: Linux-kernel
On Tue, Apr 29, 2008 at 02:47:18AM +0100, Al Viro wrote:
> On Mon, Apr 28, 2008 at 07:27:59PM +0100, Al Viro wrote:
> > > [pid 6308] clone(child_stack=0xbfc9de94, flags=CLONE_NEWNS|SIGCHLD) = 6309
> > > [pid 6309] execve("/usr/sbin/umount", ["umount", "-n", "/proc"])
> > > ...
> > > [pid 6309] oldumount("/proc") = -1 EBUSY (Device or resource busy)
> > > umount: /proc: device is busy
> > >
> > > Yes, various NAMESPACEs are enabled (i'm trying to experiment with
> > > those).
> > >
> > > Is it intentional?
> >
> > It's very odd. Could you bisect that down to offending changeset or
> > at least narrow the things down to -rc<something>? I'm going down right
> > now, so won't be able to look into that until tonight...
>
> Check the version of umount(8) you've got. And see if that strace happens
> to have open of /proc/mounts, without matching close by the time it calls
> umount(). util-linux-ng 2.13.1 is _that_ dumb...
Umm... Looks like something more odd is going on...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: umount(/proc) after CLONE_NEWNS in 2.6.25?
2008-04-29 2:06 ` Al Viro
@ 2008-04-29 2:12 ` Al Viro
2008-04-29 4:36 ` Michael Tokarev
0 siblings, 1 reply; 6+ messages in thread
From: Al Viro @ 2008-04-29 2:12 UTC (permalink / raw)
To: Michael Tokarev; +Cc: Linux-kernel
On Tue, Apr 29, 2008 at 03:06:38AM +0100, Al Viro wrote:
> > Check the version of umount(8) you've got. And see if that strace happens
> > to have open of /proc/mounts, without matching close by the time it calls
> > umount(). util-linux-ng 2.13.1 is _that_ dumb...
>
> Umm... Looks like something more odd is going on...
... or something much simpler:
; cat /proc/mounts |grep proc
proc /proc proc rw,nosuid,nodev,noexec 0 0
usbfs /proc/bus/usb usbfs rw 0 0
;
and unmounting the stuff mounted under /proc before doing umount /proc
works as expected. Amazing how well the first cup of coffee helps...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: umount(/proc) after CLONE_NEWNS in 2.6.25?
2008-04-29 2:12 ` Al Viro
@ 2008-04-29 4:36 ` Michael Tokarev
0 siblings, 0 replies; 6+ messages in thread
From: Michael Tokarev @ 2008-04-29 4:36 UTC (permalink / raw)
To: Al Viro; +Cc: Linux-kernel
Al Viro wrote:
> On Tue, Apr 29, 2008 at 03:06:38AM +0100, Al Viro wrote:
>
>>> Check the version of umount(8) you've got. And see if that strace happens
>>> to have open of /proc/mounts, without matching close by the time it calls
>>> umount(). util-linux-ng 2.13.1 is _that_ dumb...
>> Umm... Looks like something more odd is going on...
>
> ... or something much simpler:
>
> ; cat /proc/mounts |grep proc
> proc /proc proc rw,nosuid,nodev,noexec 0 0
> usbfs /proc/bus/usb usbfs rw 0 0
> ;
>
> and unmounting the stuff mounted under /proc before doing umount /proc
> works as expected. Amazing how well the first cup of coffee helps...
Hey. Don't paint ME *that* dumb... ;)
It was indeed the case here. I never tried those things on my
home machine before, and decided to experiment, but I forgot
that it has /proc/bus/usb mounted. And for comparison I used
another machine which does NOT have that filesystem mounted.
How.. dum^Wodd... ;)
Please excuse me for the noise.
/mj
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-04-29 4:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-28 17:30 umount(/proc) after CLONE_NEWNS in 2.6.25? Michael Tokarev
2008-04-28 18:27 ` Al Viro
2008-04-29 1:47 ` Al Viro
2008-04-29 2:06 ` Al Viro
2008-04-29 2:12 ` Al Viro
2008-04-29 4:36 ` Michael Tokarev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox