<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/core/net_namespace.c, branch linux-2.6.28.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2009-02-02T17:53:29Z</updated>
<entry>
<title>NET: net_namespace, fix lock imbalance</title>
<updated>2009-02-02T17:53:29Z</updated>
<author>
<name>Jiri Slaby</name>
</author>
<published>2009-01-17T06:47:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7b4fec3251eb3c770dc8baa79df8eec5403dabb2'/>
<id>urn:sha1:7b4fec3251eb3c770dc8baa79df8eec5403dabb2</id>
<content type='text'>
commit 357f5b0b91054ae23385ea4b0634bb8b43736e83 upstream.

register_pernet_gen_subsys omits mutex_unlock in one fail path.
Fix it.

Signed-off-by: Jiri Slaby &lt;jirislaby@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>netns: add register_pernet_gen_subsys/unregister_pernet_gen_subsys</title>
<updated>2008-10-31T06:55:16Z</updated>
<author>
<name>Alexey Dobriyan</name>
</author>
<published>2008-10-31T06:55:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=485ac57bc1238719b1508f91b0f9eeda4a3c84bb'/>
<id>urn:sha1:485ac57bc1238719b1508f91b0f9eeda4a3c84bb</id>
<content type='text'>
netns ops which are registered with register_pernet_gen_device() are
shutdown strictly before those which are registered with
register_pernet_subsys(). Sometimes this leads to opposite (read: buggy)
shutdown ordering between two modules.

Add register_pernet_gen_subsys()/unregister_pernet_gen_subsys() for modules
which aren't elite enough for entry in struct net, and which can't use
register_pernet_gen_device(). PPTP conntracking module is such one.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netns: fix net_generic array leak</title>
<updated>2008-10-15T05:54:48Z</updated>
<author>
<name>Alexey Dobriyan</name>
</author>
<published>2008-10-15T05:54:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4ef079ccc1d934c5f9966f2bfcd5dbbef8f7a0a7'/>
<id>urn:sha1:4ef079ccc1d934c5f9966f2bfcd5dbbef8f7a0a7</id>
<content type='text'>
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netns: export netns list</title>
<updated>2008-10-08T09:35:06Z</updated>
<author>
<name>Alexey Dobriyan</name>
</author>
<published>2008-10-08T09:35:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b76a461f11eb5f32d37a9c8eae7b2f3b3f261b43'/>
<id>urn:sha1:b76a461f11eb5f32d37a9c8eae7b2f3b3f261b43</id>
<content type='text'>
Conntrack code will use it for
a) removing expectations and helpers when corresponding module is removed, and
b) removing conntracks when L3 protocol conntrack module is removed.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>netns: Don't receive new packets in a dead network namespace.</title>
<updated>2008-06-21T05:16:51Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2008-06-21T05:16:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b9f75f45a6b46a0ab4eb0857d437a0845871f314'/>
<id>urn:sha1:b9f75f45a6b46a0ab4eb0857d437a0845871f314</id>
<content type='text'>
Alexey Dobriyan &lt;adobriyan@gmail.com&gt; writes:
&gt; Subject: ICMP sockets destruction vs ICMP packets oops

&gt; After icmp_sk_exit() nuked ICMP sockets, we get an interrupt.
&gt; icmp_reply() wants ICMP socket.
&gt;
&gt; Steps to reproduce:
&gt;
&gt; 	launch shell in new netns
&gt; 	move real NIC to netns
&gt; 	setup routing
&gt; 	ping -i 0
&gt; 	exit from shell
&gt;
&gt; BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
&gt; IP: [&lt;ffffffff803fce17&gt;] icmp_sk+0x17/0x30
&gt; PGD 17f3cd067 PUD 17f3ce067 PMD 0 
&gt; Oops: 0000 [1] PREEMPT SMP DEBUG_PAGEALLOC
&gt; CPU 0 
&gt; Modules linked in: usblp usbcore
&gt; Pid: 0, comm: swapper Not tainted 2.6.26-rc6-netns-ct #4
&gt; RIP: 0010:[&lt;ffffffff803fce17&gt;]  [&lt;ffffffff803fce17&gt;] icmp_sk+0x17/0x30
&gt; RSP: 0018:ffffffff8057fc30  EFLAGS: 00010286
&gt; RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff81017c7db900
&gt; RDX: 0000000000000034 RSI: ffff81017c7db900 RDI: ffff81017dc41800
&gt; RBP: ffffffff8057fc40 R08: 0000000000000001 R09: 000000000000a815
&gt; R10: 0000000000000000 R11: 0000000000000001 R12: ffffffff8057fd28
&gt; R13: ffffffff8057fd00 R14: ffff81017c7db938 R15: ffff81017dc41800
&gt; FS:  0000000000000000(0000) GS:ffffffff80525000(0000) knlGS:0000000000000000
&gt; CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
&gt; CR2: 0000000000000000 CR3: 000000017fcda000 CR4: 00000000000006e0
&gt; DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
&gt; DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
&gt; Process swapper (pid: 0, threadinfo ffffffff8053a000, task ffffffff804fa4a0)
&gt; Stack:  0000000000000000 ffff81017c7db900 ffffffff8057fcf0 ffffffff803fcfe4
&gt;  ffffffff804faa38 0000000000000246 0000000000005a40 0000000000000246
&gt;  000000000001ffff ffff81017dd68dc0 0000000000005a40 0000000055342436
&gt; Call Trace:
&gt;  &lt;IRQ&gt;  [&lt;ffffffff803fcfe4&gt;] icmp_reply+0x44/0x1e0
&gt;  [&lt;ffffffff803d3a0a&gt;] ? ip_route_input+0x23a/0x1360
&gt;  [&lt;ffffffff803fd645&gt;] icmp_echo+0x65/0x70
&gt;  [&lt;ffffffff803fd300&gt;] icmp_rcv+0x180/0x1b0
&gt;  [&lt;ffffffff803d6d84&gt;] ip_local_deliver+0xf4/0x1f0
&gt;  [&lt;ffffffff803d71bb&gt;] ip_rcv+0x33b/0x650
&gt;  [&lt;ffffffff803bb16a&gt;] netif_receive_skb+0x27a/0x340
&gt;  [&lt;ffffffff803be57d&gt;] process_backlog+0x9d/0x100
&gt;  [&lt;ffffffff803bdd4d&gt;] net_rx_action+0x18d/0x250
&gt;  [&lt;ffffffff80237be5&gt;] __do_softirq+0x75/0x100
&gt;  [&lt;ffffffff8020c97c&gt;] call_softirq+0x1c/0x30
&gt;  [&lt;ffffffff8020f085&gt;] do_softirq+0x65/0xa0
&gt;  [&lt;ffffffff80237af7&gt;] irq_exit+0x97/0xa0
&gt;  [&lt;ffffffff8020f198&gt;] do_IRQ+0xa8/0x130
&gt;  [&lt;ffffffff80212ee0&gt;] ? mwait_idle+0x0/0x60
&gt;  [&lt;ffffffff8020bc46&gt;] ret_from_intr+0x0/0xf
&gt;  &lt;EOI&gt;  [&lt;ffffffff80212f2c&gt;] ? mwait_idle+0x4c/0x60
&gt;  [&lt;ffffffff80212f23&gt;] ? mwait_idle+0x43/0x60
&gt;  [&lt;ffffffff8020a217&gt;] ? cpu_idle+0x57/0xa0
&gt;  [&lt;ffffffff8040f380&gt;] ? rest_init+0x70/0x80
&gt; Code: 10 5b 41 5c 41 5d 41 5e c9 c3 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 53
&gt; 48 83 ec 08 48 8b 9f 78 01 00 00 e8 2b c7 f1 ff 89 c0 &lt;48&gt; 8b 04 c3 48 83 c4 08
&gt; 5b c9 c3 66 66 66 66 66 2e 0f 1f 84 00
&gt; RIP  [&lt;ffffffff803fce17&gt;] icmp_sk+0x17/0x30
&gt;  RSP &lt;ffffffff8057fc30&gt;
&gt; CR2: 0000000000000000
&gt; ---[ end trace ea161157b76b33e8 ]---
&gt; Kernel panic - not syncing: Aiee, killing interrupt handler!

Receiving packets while we are cleaning up a network namespace is a
racy proposition. It is possible when the packet arrives that we have
removed some but not all of the state we need to fully process it.  We
have the choice of either playing wack-a-mole with the cleanup routines
or simply dropping packets when we don't have a network namespace to
handle them.

Since the check looks inexpensive in netif_receive_skb let's just
drop the incoming packets.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NETNS]: Make netns refconting debug like a socket one.</title>
<updated>2008-04-16T08:58:04Z</updated>
<author>
<name>Denis V. Lunev</name>
</author>
<published>2008-04-16T08:58:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d1e4468a7705db7c1415a65fd16f07113afc1b2'/>
<id>urn:sha1:5d1e4468a7705db7c1415a65fd16f07113afc1b2</id>
<content type='text'>
Make release_net/hold_net noop for performance-hungry people. This is a debug
staff and should be used in the debug mode only.

Add check for net != NULL in hold/release calls. This will be required
later on.

[ Added minor simplifications suggested by Brian Haley. -DaveM ]

Signed-off-by: Denis V. Lunev &lt;den@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NETNS]: The generic per-net pointers.</title>
<updated>2008-04-15T07:36:08Z</updated>
<author>
<name>Pavel Emelyanov</name>
</author>
<published>2008-04-15T07:36:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dec827d174d7f76c457238800183ca864a639365'/>
<id>urn:sha1:dec827d174d7f76c457238800183ca864a639365</id>
<content type='text'>
Add the elastic array of void * pointer to the struct net.
The access rules are simple:

 1. register the ops with register_pernet_gen_device to get
    the id of your private pointer
 2. call net_assign_generic() to put the private data on the
    struct net (most preferably this should be done in the
    -&gt;init callback of the ops registered)
 3. do not store any private reference on the net_generic array;
 4. do not change this pointer while the net is alive;
 5. use the net_generic() to get the pointer.

When adding a new pointer, I copy the old array, replace it
with a new one and schedule the old for kfree after an RCU
grace period.

Since the net_generic explores the net-&gt;gen array inside rcu
read section and once set the net-&gt;gen-&gt;ptr[x] pointer never 
changes, this grants us a safe access to generic pointers.

Quoting Paul: "... RCU is protecting -only- the net_generic 
structure that net_generic() is traversing, and the [pointer]
returned by net_generic() is protected by a reference counter 
in the upper-level struct net."

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Acked-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NETNS]: The net-subsys IDs generator.</title>
<updated>2008-04-15T07:35:23Z</updated>
<author>
<name>Pavel Emelyanov</name>
</author>
<published>2008-04-15T07:35:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c93cf61fd1d5378134f9b06703f7078067542e00'/>
<id>urn:sha1:c93cf61fd1d5378134f9b06703f7078067542e00</id>
<content type='text'>
To make some per-net generic pointers, we need some way to address
them, i.e. - IDs. This is simple IDA-based IDs generator for pernet
subsystems.

Addressing questions about potential checkpoint/restart problems: 
these IDs are "lite-offsets" within the net structure and are by no 
means supposed to be exported to the userspace.

Since it will be used in the nearest future by devices only (tun,
vlan, tunnels, bridge, etc), I make it resemble the functionality
of register_pernet_device().

The new ids is stored in the *id pointer _before_ calling the init
callback to make this id available in this callback.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>typo fixes in net/core/net_namespace.c</title>
<updated>2008-02-03T15:56:48Z</updated>
<author>
<name>Oliver Pinter</name>
</author>
<published>2008-02-03T15:56:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=53379e57a7705e2946c8d77d09a57a169097a6fe'/>
<id>urn:sha1:53379e57a7705e2946c8d77d09a57a169097a6fe</id>
<content type='text'>
Signed-off-by: Oliver Pinter &lt;oliver.pntr@gmail.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
</content>
</entry>
<entry>
<title>[NET]: Make netns cleanup to run in a separate queue</title>
<updated>2008-01-28T22:54:35Z</updated>
<author>
<name>Benjamin Thery</name>
</author>
<published>2007-11-20T07:18:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ef1355dcb8551730cc71e9ef4363f5c66ccad17'/>
<id>urn:sha1:3ef1355dcb8551730cc71e9ef4363f5c66ccad17</id>
<content type='text'>
This patch adds a separate workqueue for cleaning up a network
namespace. If we use the keventd workqueue to execute cleanup_net(),
there is a problem to unregister devices in IPv6. Indeed the code
that cleans up also schedule work in keventd: as long as cleanup_net()
hasn't return, dst_gc_task() cannot run and as long as dst_gc_task() has
not run, there are still some references pending on the net devices and
cleanup_net() can not unregister and exit the keventd workqueue.

Signed-off-by: Benjamin Thery &lt;benjamin.thery@bull.net&gt;
Signed-off-by: Daniel Lezcano &lt;dlezcano@fr.ibm.com&gt;
Acked-by: Denis V. Lunev &lt;den@openvz.org&gt;
Acked-By: Kirill Korotaev &lt;dev@sw.ru&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
