umount(/proc) after CLONE_NEWNS in 2.6.25? - Kernel

This is a discussion on umount(/proc) after CLONE_NEWNS in 2.6.25? - 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") = ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: umount(/proc) after CLONE_NEWNS in 2.6.25?

  1. umount(/proc) after CLONE_NEWNS in 2.6.25?

    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
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: umount(/proc) after CLONE_NEWNS in 2.6.25?

    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? I'm going down right
    now, so won't be able to look into that until tonight...
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. Re: umount(/proc) after CLONE_NEWNS in 2.6.25?

    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? 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...
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  4. Re: umount(/proc) after CLONE_NEWNS in 2.6.25?

    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? 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...
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  5. Re: umount(/proc) after CLONE_NEWNS in 2.6.25?

    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...
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  6. Re: umount(/proc) after CLONE_NEWNS in 2.6.25?

    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
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread