[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#577640: linux-image-2.6.33-2-amd64: Kernel warnings in netns thread



On Thu, Apr 22, 2010 at 04:38, Eric W. Biederman <ebiederm@xmission.com> wrote:
>>> > $ sudo ./startns bash
>>> > # ip l a type veth
>>> > # ip l s veth0 netns 1
>>> > # exit

> Then I should ask what is startns?

That's just a simple C program that calls unshare(CLONE_NEWNET) and
execs a shell.

> Either that is doing something different from my equivalent program, or I have
> patches to fix this, that just haven't been merged yet.

I have just downloaded and compiled 2.6.32-2 and 2.6.34-rc5 from
kernel.org using the .config from the debian package, and the oops is
reproducible in both.

This small C file reproduces the error every time:

$ cat netnsoops.c
#include <stdio.h>
#include <stdlib.h>
#define _GNU_SOURCE
#include <sched.h>

int main(int argc, char *argv[])
{	
	int c;
	unsigned long flags = CLONE_NEWNET;

	if(unshare(flags) == -1) {
		perror("unshare");
		return 1;
	}
	system("ip link add name FOO type veth peer name BAR");
	system("ip link set FOO netns 1");
	system("ip link show");
	return 0;
}


-- 
Martín Ferrari



Reply to: