I got the reproducer down to the following minimal code:

#define _GNU_SOURCE
#include <unistd.h>
#include <sched.h>
#include <sys/wait.h>
#include <sys/mount.h>

int loop(void *arg)
{
        for (;;)
            mount("/", "/", "", MS_BIND | MS_REC, 0);
        return 0;
}

int main()
{
        int pid, status;
        char stack[65536];

        pid = clone(loop, &stack[sizeof(stack)-8], CLONE_NEWUSER | CLONE_NEWNS 
| CLONE_NEWPID, 0, 0);
        while (waitpid(pid, &status, __WALL) != pid);
        return 0;
}

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1542010

Title:
  add stressors for recursive mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/stress-ng/+bug/1542010/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to