<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/net/ipv6, branch v2.6.27</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>XFRM,IPv6: initialize ip6_dst_blackhole_ops.kmem_cachep</title>
<updated>2008-10-01T09:37:56+00:00</updated>
<author>
<name>Arnaud Ebalard</name>
<email>arno@natisbad.org</email>
</author>
<published>2008-10-01T09:37:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5dc121e9a7a8a3721cefeb07f3559f50fbedc67e'/>
<id>5dc121e9a7a8a3721cefeb07f3559f50fbedc67e</id>
<content type='text'>
ip6_dst_blackhole_ops.kmem_cachep is not expected to be NULL (i.e. to
be initialized) when dst_alloc() is called from ip6_dst_blackhole().
Otherwise, it results in the following (xfrm_larval_drop is now set to
1 by default):

[   78.697642] Unable to handle kernel paging request for data at address 0x0000004c
[   78.703449] Faulting instruction address: 0xc0097f54
[   78.786896] Oops: Kernel access of bad area, sig: 11 [#1]
[   78.792791] PowerMac
[   78.798383] Modules linked in: btusb usbhid bluetooth b43 mac80211 cfg80211 ehci_hcd ohci_hcd sungem sungem_phy usbcore ssb
[   78.804263] NIP: c0097f54 LR: c0334a28 CTR: c002d430
[   78.809997] REGS: eef19ad0 TRAP: 0300   Not tainted  (2.6.27-rc5)
[   78.815743] MSR: 00001032 &lt;ME,IR,DR&gt;  CR: 22242482  XER: 20000000
[   78.821550] DAR: 0000004c, DSISR: 40000000
[   78.827278] TASK = eef0df40[3035] 'mip6d' THREAD: eef18000
[   78.827408] GPR00: 00001032 eef19b80 eef0df40 00000000 00008020 eef19c30 00000001 00000000
[   78.833249] GPR08: eee5101c c05a5c10 ef9ad500 00000000 24242422 1005787c 00000000 1004f960
[   78.839151] GPR16: 00000000 10024e90 10050040 48030018 0fe44150 00000000 00000000 eef19c30
[   78.845046] GPR24: eef19e44 00000000 eef19bf8 efb37c14 eef19bf8 00008020 00009032 c0596064
[   78.856671] NIP [c0097f54] kmem_cache_alloc+0x20/0x94
[   78.862581] LR [c0334a28] dst_alloc+0x40/0xc4
[   78.868451] Call Trace:
[   78.874252] [eef19b80] [c03c1810] ip6_dst_lookup_tail+0x1c8/0x1dc (unreliable)
[   78.880222] [eef19ba0] [c0334a28] dst_alloc+0x40/0xc4
[   78.886164] [eef19bb0] [c03cd698] ip6_dst_blackhole+0x28/0x1cc
[   78.892090] [eef19be0] [c03d9be8] rawv6_sendmsg+0x75c/0xc88
[   78.897999] [eef19cb0] [c038bca4] inet_sendmsg+0x4c/0x78
[   78.903907] [eef19cd0] [c03207c8] sock_sendmsg+0xac/0xe4
[   78.909734] [eef19db0] [c03209e4] sys_sendmsg+0x1e4/0x2a0
[   78.915540] [eef19f00] [c03220a8] sys_socketcall+0xfc/0x210
[   78.921406] [eef19f40] [c0014b3c] ret_from_syscall+0x0/0x38
[   78.927295] --- Exception: c01 at 0xfe2d730
[   78.927297]     LR = 0xfe2d71c
[   78.939019] Instruction dump:
[   78.944835] 91640018 9144001c 900a0000 4bffff44 9421ffe0 7c0802a6 bf810010 7c9d2378
[   78.950694] 90010024 7fc000a6 57c0045e 7c000124 &lt;83e3004c&gt; 8383005c 2f9f0000 419e0050
[   78.956464] ---[ end trace 05fa1ed7972487a1 ]---

As commented by Benjamin Thery, the bug was introduced by
f2fc6a54585a1be6669613a31fbaba2ecbadcd36, while adding network
namespaces support to ipv6 routes.

Signed-off-by: Arnaud Ebalard &lt;arno@natisbad.org&gt;
Acked-by: Benjamin Thery &lt;benjamin.thery@bull.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ip6_dst_blackhole_ops.kmem_cachep is not expected to be NULL (i.e. to
be initialized) when dst_alloc() is called from ip6_dst_blackhole().
Otherwise, it results in the following (xfrm_larval_drop is now set to
1 by default):

[   78.697642] Unable to handle kernel paging request for data at address 0x0000004c
[   78.703449] Faulting instruction address: 0xc0097f54
[   78.786896] Oops: Kernel access of bad area, sig: 11 [#1]
[   78.792791] PowerMac
[   78.798383] Modules linked in: btusb usbhid bluetooth b43 mac80211 cfg80211 ehci_hcd ohci_hcd sungem sungem_phy usbcore ssb
[   78.804263] NIP: c0097f54 LR: c0334a28 CTR: c002d430
[   78.809997] REGS: eef19ad0 TRAP: 0300   Not tainted  (2.6.27-rc5)
[   78.815743] MSR: 00001032 &lt;ME,IR,DR&gt;  CR: 22242482  XER: 20000000
[   78.821550] DAR: 0000004c, DSISR: 40000000
[   78.827278] TASK = eef0df40[3035] 'mip6d' THREAD: eef18000
[   78.827408] GPR00: 00001032 eef19b80 eef0df40 00000000 00008020 eef19c30 00000001 00000000
[   78.833249] GPR08: eee5101c c05a5c10 ef9ad500 00000000 24242422 1005787c 00000000 1004f960
[   78.839151] GPR16: 00000000 10024e90 10050040 48030018 0fe44150 00000000 00000000 eef19c30
[   78.845046] GPR24: eef19e44 00000000 eef19bf8 efb37c14 eef19bf8 00008020 00009032 c0596064
[   78.856671] NIP [c0097f54] kmem_cache_alloc+0x20/0x94
[   78.862581] LR [c0334a28] dst_alloc+0x40/0xc4
[   78.868451] Call Trace:
[   78.874252] [eef19b80] [c03c1810] ip6_dst_lookup_tail+0x1c8/0x1dc (unreliable)
[   78.880222] [eef19ba0] [c0334a28] dst_alloc+0x40/0xc4
[   78.886164] [eef19bb0] [c03cd698] ip6_dst_blackhole+0x28/0x1cc
[   78.892090] [eef19be0] [c03d9be8] rawv6_sendmsg+0x75c/0xc88
[   78.897999] [eef19cb0] [c038bca4] inet_sendmsg+0x4c/0x78
[   78.903907] [eef19cd0] [c03207c8] sock_sendmsg+0xac/0xe4
[   78.909734] [eef19db0] [c03209e4] sys_sendmsg+0x1e4/0x2a0
[   78.915540] [eef19f00] [c03220a8] sys_socketcall+0xfc/0x210
[   78.921406] [eef19f40] [c0014b3c] ret_from_syscall+0x0/0x38
[   78.927295] --- Exception: c01 at 0xfe2d730
[   78.927297]     LR = 0xfe2d71c
[   78.939019] Instruction dump:
[   78.944835] 91640018 9144001c 900a0000 4bffff44 9421ffe0 7c0802a6 bf810010 7c9d2378
[   78.950694] 90010024 7fc000a6 57c0045e 7c000124 &lt;83e3004c&gt; 8383005c 2f9f0000 419e0050
[   78.956464] ---[ end trace 05fa1ed7972487a1 ]---

As commented by Benjamin Thery, the bug was introduced by
f2fc6a54585a1be6669613a31fbaba2ecbadcd36, while adding network
namespaces support to ipv6 routes.

Signed-off-by: Arnaud Ebalard &lt;arno@natisbad.org&gt;
Acked-by: Benjamin Thery &lt;benjamin.thery@bull.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv6: NULL pointer dereferrence in tcp_v6_send_ack</title>
<updated>2008-10-01T09:13:16+00:00</updated>
<author>
<name>Denis V. Lunev</name>
<email>den@openvz.org</email>
</author>
<published>2008-10-01T09:13:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2a5b82751f73a0bf6f604ce56d34adba6da1b246'/>
<id>2a5b82751f73a0bf6f604ce56d34adba6da1b246</id>
<content type='text'>
The following actions are possible:
tcp_v6_rcv
  skb-&gt;dev = NULL;
  tcp_v6_do_rcv
    tcp_v6_hnd_req
      tcp_check_req
        req-&gt;rsk_ops-&gt;send_ack == tcp_v6_send_ack

So, skb-&gt;dev can be NULL in tcp_v6_send_ack. We must obtain namespace
from dst entry.

Thanks to Vitaliy Gusev &lt;vgusev@openvz.org&gt; for initial problem finding
in IPv4 code.

Signed-off-by: Denis V. Lunev &lt;den@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following actions are possible:
tcp_v6_rcv
  skb-&gt;dev = NULL;
  tcp_v6_do_rcv
    tcp_v6_hnd_req
      tcp_check_req
        req-&gt;rsk_ops-&gt;send_ack == tcp_v6_send_ack

So, skb-&gt;dev can be NULL in tcp_v6_send_ack. We must obtain namespace
from dst entry.

Thanks to Vitaliy Gusev &lt;vgusev@openvz.org&gt; for initial problem finding
in IPv4 code.

Signed-off-by: Denis V. Lunev &lt;den@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter: ip6t_{hbh,dst}: Rejects not-strict mode on rule insertion</title>
<updated>2008-09-24T22:53:39+00:00</updated>
<author>
<name>Yasuyuki Kozakai</name>
<email>yasuyuki.kozakai@toshiba.co.jp</email>
</author>
<published>2008-09-24T22:53:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8ca31ce52a5cfd03b960fd81a49197ae85d25347'/>
<id>8ca31ce52a5cfd03b960fd81a49197ae85d25347</id>
<content type='text'>
The current code ignores rules for internal options in HBH/DST options
header in packet processing if 'Not strict' mode is specified (which is not
implemented). Clearly it is not expected by user.

Kernel should reject HBH/DST rule insertion with 'Not strict' mode
in the first place.

Signed-off-by: Yasuyuki Kozakai &lt;yasuyuki.kozakai@toshiba.co.jp&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current code ignores rules for internal options in HBH/DST options
header in packet processing if 'Not strict' mode is specified (which is not
implemented). Clearly it is not expected by user.

Kernel should reject HBH/DST rule insertion with 'Not strict' mode
in the first place.

Signed-off-by: Yasuyuki Kozakai &lt;yasuyuki.kozakai@toshiba.co.jp&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv6: Fix OOPS in ip6_dst_lookup_tail().</title>
<updated>2008-09-09T20:51:35+00:00</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2008-09-09T20:51:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e550dfb0c2c31b6363aa463a035fc9f8dcaa3c9b'/>
<id>e550dfb0c2c31b6363aa463a035fc9f8dcaa3c9b</id>
<content type='text'>
This fixes kernel bugzilla 11469: "TUN with 1024 neighbours:
ip6_dst_lookup_tail NULL crash"

dst-&gt;neighbour is not necessarily hooked up at this point
in the processing path, so blindly dereferencing it is
the wrong thing to do.  This NULL check exists in other
similar paths and this case was just an oversight.

Also fix the completely wrong and confusing indentation
here while we're at it.

Based upon a patch by Evgeniy Polyakov.

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes kernel bugzilla 11469: "TUN with 1024 neighbours:
ip6_dst_lookup_tail NULL crash"

dst-&gt;neighbour is not necessarily hooked up at this point
in the processing path, so blindly dereferencing it is
the wrong thing to do.  This NULL check exists in other
similar paths and this case was just an oversight.

Also fix the completely wrong and confusing indentation
here while we're at it.

Based upon a patch by Evgeniy Polyakov.

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netns : fix kernel panic in timewait socket destruction</title>
<updated>2008-09-08T20:17:27+00:00</updated>
<author>
<name>Daniel Lezcano</name>
<email>dlezcano@fr.ibm.com</email>
</author>
<published>2008-09-08T20:17:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d315492b1a6ba29da0fa2860759505ae1b2db857'/>
<id>d315492b1a6ba29da0fa2860759505ae1b2db857</id>
<content type='text'>
How to reproduce ?
 - create a network namespace
 - use tcp protocol and get timewait socket
 - exit the network namespace
 - after a moment (when the timewait socket is destroyed), the kernel
   panics.

# BUG: unable to handle kernel NULL pointer dereference at
0000000000000007
IP: [&lt;ffffffff821e394d&gt;] inet_twdr_do_twkill_work+0x6e/0xb8
PGD 119985067 PUD 11c5c0067 PMD 0
Oops: 0000 [1] SMP
CPU 1
Modules linked in: ipv6 button battery ac loop dm_mod tg3 libphy ext3 jbd
edd fan thermal processor thermal_sys sg sata_svw libata dock serverworks
sd_mod scsi_mod ide_disk ide_core [last unloaded: freq_table]
Pid: 0, comm: swapper Not tainted 2.6.27-rc2 #3
RIP: 0010:[&lt;ffffffff821e394d&gt;] [&lt;ffffffff821e394d&gt;]
inet_twdr_do_twkill_work+0x6e/0xb8
RSP: 0018:ffff88011ff7fed0 EFLAGS: 00010246
RAX: ffffffffffffffff RBX: ffffffff82339420 RCX: ffff88011ff7ff30
RDX: 0000000000000001 RSI: ffff88011a4d03c0 RDI: ffff88011ac2fc00
RBP: ffffffff823392e0 R08: 0000000000000000 R09: ffff88002802a200
R10: ffff8800a5c4b000 R11: ffffffff823e4080 R12: ffff88011ac2fc00
R13: 0000000000000001 R14: 0000000000000001 R15: 0000000000000000
FS: 0000000041cbd940(0000) GS:ffff8800bff839c0(0000)
knlGS:0000000000000000
CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 0000000000000007 CR3: 00000000bd87c000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper (pid: 0, threadinfo ffff8800bff9e000, task
ffff88011ff76690)
Stack: ffffffff823392e0 0000000000000100 ffffffff821e3a3a
0000000000000008
0000000000000000 ffffffff821e3a61 ffff8800bff7c000 ffffffff8203c7e7
ffff88011ff7ff10 ffff88011ff7ff10 0000000000000021 ffffffff82351108
Call Trace:
&lt;IRQ&gt; [&lt;ffffffff821e3a3a&gt;] ? inet_twdr_hangman+0x0/0x9e
[&lt;ffffffff821e3a61&gt;] ? inet_twdr_hangman+0x27/0x9e
[&lt;ffffffff8203c7e7&gt;] ? run_timer_softirq+0x12c/0x193
[&lt;ffffffff820390d1&gt;] ? __do_softirq+0x5e/0xcd
[&lt;ffffffff8200d08c&gt;] ? call_softirq+0x1c/0x28
[&lt;ffffffff8200e611&gt;] ? do_softirq+0x2c/0x68
[&lt;ffffffff8201a055&gt;] ? smp_apic_timer_interrupt+0x8e/0xa9
[&lt;ffffffff8200cad6&gt;] ? apic_timer_interrupt+0x66/0x70
&lt;EOI&gt; [&lt;ffffffff82011f4c&gt;] ? default_idle+0x27/0x3b
[&lt;ffffffff8200abbd&gt;] ? cpu_idle+0x5f/0x7d


Code: e8 01 00 00 4c 89 e7 41 ff c5 e8 8d fd ff ff 49 8b 44 24 38 4c 89 e7
65 8b 14 25 24 00 00 00 89 d2 48 8b 80 e8 00 00 00 48 f7 d0 &lt;48&gt; 8b 04 d0
48 ff 40 58 e8 fc fc ff ff 48 89 df e8 c0 5f 04 00
RIP [&lt;ffffffff821e394d&gt;] inet_twdr_do_twkill_work+0x6e/0xb8
RSP &lt;ffff88011ff7fed0&gt;
CR2: 0000000000000007

This patch provides a function to purge all timewait sockets related
to a network namespace. The timewait sockets life cycle is not tied with
the network namespace, that means the timewait sockets stay alive while
the network namespace dies. The timewait sockets are for avoiding to
receive a duplicate packet from the network, if the network namespace is
freed, the network stack is removed, so no chance to receive any packets
from the outside world. Furthermore, having a pending destruction timer
on these sockets with a network namespace freed is not safe and will lead
to an oops if the timer callback which try to access data belonging to 
the namespace like for example in:
	inet_twdr_do_twkill_work
		-&gt; NET_INC_STATS_BH(twsk_net(tw), LINUX_MIB_TIMEWAITED);

Purging the timewait sockets at the network namespace destruction will:
 1) speed up memory freeing for the namespace
 2) fix kernel panic on asynchronous timewait destruction

Signed-off-by: Daniel Lezcano &lt;dlezcano@fr.ibm.com&gt;
Acked-by: Denis V. Lunev &lt;den@openvz.org&gt;
Acked-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
How to reproduce ?
 - create a network namespace
 - use tcp protocol and get timewait socket
 - exit the network namespace
 - after a moment (when the timewait socket is destroyed), the kernel
   panics.

# BUG: unable to handle kernel NULL pointer dereference at
0000000000000007
IP: [&lt;ffffffff821e394d&gt;] inet_twdr_do_twkill_work+0x6e/0xb8
PGD 119985067 PUD 11c5c0067 PMD 0
Oops: 0000 [1] SMP
CPU 1
Modules linked in: ipv6 button battery ac loop dm_mod tg3 libphy ext3 jbd
edd fan thermal processor thermal_sys sg sata_svw libata dock serverworks
sd_mod scsi_mod ide_disk ide_core [last unloaded: freq_table]
Pid: 0, comm: swapper Not tainted 2.6.27-rc2 #3
RIP: 0010:[&lt;ffffffff821e394d&gt;] [&lt;ffffffff821e394d&gt;]
inet_twdr_do_twkill_work+0x6e/0xb8
RSP: 0018:ffff88011ff7fed0 EFLAGS: 00010246
RAX: ffffffffffffffff RBX: ffffffff82339420 RCX: ffff88011ff7ff30
RDX: 0000000000000001 RSI: ffff88011a4d03c0 RDI: ffff88011ac2fc00
RBP: ffffffff823392e0 R08: 0000000000000000 R09: ffff88002802a200
R10: ffff8800a5c4b000 R11: ffffffff823e4080 R12: ffff88011ac2fc00
R13: 0000000000000001 R14: 0000000000000001 R15: 0000000000000000
FS: 0000000041cbd940(0000) GS:ffff8800bff839c0(0000)
knlGS:0000000000000000
CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 0000000000000007 CR3: 00000000bd87c000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper (pid: 0, threadinfo ffff8800bff9e000, task
ffff88011ff76690)
Stack: ffffffff823392e0 0000000000000100 ffffffff821e3a3a
0000000000000008
0000000000000000 ffffffff821e3a61 ffff8800bff7c000 ffffffff8203c7e7
ffff88011ff7ff10 ffff88011ff7ff10 0000000000000021 ffffffff82351108
Call Trace:
&lt;IRQ&gt; [&lt;ffffffff821e3a3a&gt;] ? inet_twdr_hangman+0x0/0x9e
[&lt;ffffffff821e3a61&gt;] ? inet_twdr_hangman+0x27/0x9e
[&lt;ffffffff8203c7e7&gt;] ? run_timer_softirq+0x12c/0x193
[&lt;ffffffff820390d1&gt;] ? __do_softirq+0x5e/0xcd
[&lt;ffffffff8200d08c&gt;] ? call_softirq+0x1c/0x28
[&lt;ffffffff8200e611&gt;] ? do_softirq+0x2c/0x68
[&lt;ffffffff8201a055&gt;] ? smp_apic_timer_interrupt+0x8e/0xa9
[&lt;ffffffff8200cad6&gt;] ? apic_timer_interrupt+0x66/0x70
&lt;EOI&gt; [&lt;ffffffff82011f4c&gt;] ? default_idle+0x27/0x3b
[&lt;ffffffff8200abbd&gt;] ? cpu_idle+0x5f/0x7d


Code: e8 01 00 00 4c 89 e7 41 ff c5 e8 8d fd ff ff 49 8b 44 24 38 4c 89 e7
65 8b 14 25 24 00 00 00 89 d2 48 8b 80 e8 00 00 00 48 f7 d0 &lt;48&gt; 8b 04 d0
48 ff 40 58 e8 fc fc ff ff 48 89 df e8 c0 5f 04 00
RIP [&lt;ffffffff821e394d&gt;] inet_twdr_do_twkill_work+0x6e/0xb8
RSP &lt;ffff88011ff7fed0&gt;
CR2: 0000000000000007

This patch provides a function to purge all timewait sockets related
to a network namespace. The timewait sockets life cycle is not tied with
the network namespace, that means the timewait sockets stay alive while
the network namespace dies. The timewait sockets are for avoiding to
receive a duplicate packet from the network, if the network namespace is
freed, the network stack is removed, so no chance to receive any packets
from the outside world. Furthermore, having a pending destruction timer
on these sockets with a network namespace freed is not safe and will lead
to an oops if the timer callback which try to access data belonging to 
the namespace like for example in:
	inet_twdr_do_twkill_work
		-&gt; NET_INC_STATS_BH(twsk_net(tw), LINUX_MIB_TIMEWAITED);

Purging the timewait sockets at the network namespace destruction will:
 1) speed up memory freeing for the namespace
 2) fix kernel panic on asynchronous timewait destruction

Signed-off-by: Daniel Lezcano &lt;dlezcano@fr.ibm.com&gt;
Acked-by: Denis V. Lunev &lt;den@openvz.org&gt;
Acked-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv6: When we droped a packet, we should return NET_RX_DROP instead of 0</title>
<updated>2008-08-29T21:27:51+00:00</updated>
<author>
<name>Yang Hongyang</name>
<email>yanghy@cn.fujitsu.com</email>
</author>
<published>2008-08-29T21:06:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3cc76caa98b092a8fb3e7b4303c70f847db0651f'/>
<id>3cc76caa98b092a8fb3e7b4303c70f847db0651f</id>
<content type='text'>
Signed-off-by: Yang Hongyang &lt;yanghy@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Yang Hongyang &lt;yanghy@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv6: sysctl fixes</title>
<updated>2008-08-25T22:18:15+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2008-08-25T22:18:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ce3113ec57abcd41cc5a2fed02474aee3f63d12c'/>
<id>ce3113ec57abcd41cc5a2fed02474aee3f63d12c</id>
<content type='text'>
Braino: net.ipv6 in ipv6 skeleton has no business in rotable
class

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Braino: net.ipv6 in ipv6 skeleton has no business in rotable
class

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv6: protocol for address routes</title>
<updated>2008-08-23T12:16:46+00:00</updated>
<author>
<name>Stephen Hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2008-08-23T12:16:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f410a1fba7afa79d2992620e874a343fdba28332'/>
<id>f410a1fba7afa79d2992620e874a343fdba28332</id>
<content type='text'>
This fixes a problem spotted with zebra, but not sure if it is
necessary a kernel problem.  With IPV6 when an address is added to an
interface, Zebra creates a duplicate RIB entry, one as a connected
route, and other as a kernel route.

When an address is added to an interface the RTN_NEWADDR message
causes Zebra to create a connected route. In IPV4 when an address is
added to an interface a RTN_NEWROUTE message is set to user space with
the protocol RTPROT_KERNEL. Zebra ignores these messages, because it
already has the connected route.

The problem is that route created in IPV6 has route protocol ==
RTPROT_BOOT.  Was this a design decision or a bug? This fixes it. Same
patch applies to both net-2.6 and stable.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a problem spotted with zebra, but not sure if it is
necessary a kernel problem.  With IPV6 when an address is added to an
interface, Zebra creates a duplicate RIB entry, one as a connected
route, and other as a kernel route.

When an address is added to an interface the RTN_NEWADDR message
causes Zebra to create a connected route. In IPV4 when an address is
added to an interface a RTN_NEWROUTE message is set to user space with
the protocol RTPROT_KERNEL. Zebra ignores these messages, because it
already has the connected route.

The problem is that route created in IPV6 has route protocol ==
RTPROT_BOOT.  Was this a design decision or a bug? This fixes it. Same
patch applies to both net-2.6 and stable.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>icmp: icmp_sk() should not use smp_processor_id() in preemptible code</title>
<updated>2008-08-23T11:43:33+00:00</updated>
<author>
<name>Denis V. Lunev</name>
<email>den@openvz.org</email>
</author>
<published>2008-08-23T11:43:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fdc0bde90a689b9145f2b6f271c03f4c99d09667'/>
<id>fdc0bde90a689b9145f2b6f271c03f4c99d09667</id>
<content type='text'>
Pass namespace into icmp_xmit_lock, obtain socket inside and return
it as a result for caller.

Thanks Alexey Dobryan for this report:

Steps to reproduce:

	CONFIG_PREEMPT=y
	CONFIG_DEBUG_PREEMPT=y
	tracepath &lt;something&gt;

BUG: using smp_processor_id() in preemptible [00000000] code: tracepath/3205
caller is icmp_sk+0x15/0x30
Pid: 3205, comm: tracepath Not tainted 2.6.27-rc4 #1

Call Trace:
 [&lt;ffffffff8031af14&gt;] debug_smp_processor_id+0xe4/0xf0
 [&lt;ffffffff80409405&gt;] icmp_sk+0x15/0x30
 [&lt;ffffffff8040a17b&gt;] icmp_send+0x4b/0x3f0
 [&lt;ffffffff8025a415&gt;] ? trace_hardirqs_on_caller+0xd5/0x160
 [&lt;ffffffff8025a4ad&gt;] ? trace_hardirqs_on+0xd/0x10
 [&lt;ffffffff8023a475&gt;] ? local_bh_enable_ip+0x95/0x110
 [&lt;ffffffff804285b9&gt;] ? _spin_unlock_bh+0x39/0x40
 [&lt;ffffffff8025a26c&gt;] ? mark_held_locks+0x4c/0x90
 [&lt;ffffffff8025a4ad&gt;] ? trace_hardirqs_on+0xd/0x10
 [&lt;ffffffff8025a415&gt;] ? trace_hardirqs_on_caller+0xd5/0x160
 [&lt;ffffffff803e91b4&gt;] ip_fragment+0x8d4/0x900
 [&lt;ffffffff803e7030&gt;] ? ip_finish_output2+0x0/0x290
 [&lt;ffffffff803e91e0&gt;] ? ip_finish_output+0x0/0x60
 [&lt;ffffffff803e6650&gt;] ? dst_output+0x0/0x10
 [&lt;ffffffff803e922c&gt;] ip_finish_output+0x4c/0x60
 [&lt;ffffffff803e92e3&gt;] ip_output+0xa3/0xf0
 [&lt;ffffffff803e68d0&gt;] ip_local_out+0x20/0x30
 [&lt;ffffffff803e753f&gt;] ip_push_pending_frames+0x27f/0x400
 [&lt;ffffffff80406313&gt;] udp_push_pending_frames+0x233/0x3d0
 [&lt;ffffffff804067d1&gt;] udp_sendmsg+0x321/0x6f0
 [&lt;ffffffff8040d155&gt;] inet_sendmsg+0x45/0x80
 [&lt;ffffffff803b967f&gt;] sock_sendmsg+0xdf/0x110
 [&lt;ffffffff8024a100&gt;] ? autoremove_wake_function+0x0/0x40
 [&lt;ffffffff80257ce5&gt;] ? validate_chain+0x415/0x1010
 [&lt;ffffffff8027dc10&gt;] ? __do_fault+0x140/0x450
 [&lt;ffffffff802597d0&gt;] ? __lock_acquire+0x260/0x590
 [&lt;ffffffff803b9e55&gt;] ? sockfd_lookup_light+0x45/0x80
 [&lt;ffffffff803ba50a&gt;] sys_sendto+0xea/0x120
 [&lt;ffffffff80428e42&gt;] ? _spin_unlock_irqrestore+0x42/0x80
 [&lt;ffffffff803134bc&gt;] ? __up_read+0x4c/0xb0
 [&lt;ffffffff8024e0c6&gt;] ? up_read+0x26/0x30
 [&lt;ffffffff8020b8bb&gt;] system_call_fastpath+0x16/0x1b

icmp6_sk() is similar.

Signed-off-by: Denis V. Lunev &lt;den@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pass namespace into icmp_xmit_lock, obtain socket inside and return
it as a result for caller.

Thanks Alexey Dobryan for this report:

Steps to reproduce:

	CONFIG_PREEMPT=y
	CONFIG_DEBUG_PREEMPT=y
	tracepath &lt;something&gt;

BUG: using smp_processor_id() in preemptible [00000000] code: tracepath/3205
caller is icmp_sk+0x15/0x30
Pid: 3205, comm: tracepath Not tainted 2.6.27-rc4 #1

Call Trace:
 [&lt;ffffffff8031af14&gt;] debug_smp_processor_id+0xe4/0xf0
 [&lt;ffffffff80409405&gt;] icmp_sk+0x15/0x30
 [&lt;ffffffff8040a17b&gt;] icmp_send+0x4b/0x3f0
 [&lt;ffffffff8025a415&gt;] ? trace_hardirqs_on_caller+0xd5/0x160
 [&lt;ffffffff8025a4ad&gt;] ? trace_hardirqs_on+0xd/0x10
 [&lt;ffffffff8023a475&gt;] ? local_bh_enable_ip+0x95/0x110
 [&lt;ffffffff804285b9&gt;] ? _spin_unlock_bh+0x39/0x40
 [&lt;ffffffff8025a26c&gt;] ? mark_held_locks+0x4c/0x90
 [&lt;ffffffff8025a4ad&gt;] ? trace_hardirqs_on+0xd/0x10
 [&lt;ffffffff8025a415&gt;] ? trace_hardirqs_on_caller+0xd5/0x160
 [&lt;ffffffff803e91b4&gt;] ip_fragment+0x8d4/0x900
 [&lt;ffffffff803e7030&gt;] ? ip_finish_output2+0x0/0x290
 [&lt;ffffffff803e91e0&gt;] ? ip_finish_output+0x0/0x60
 [&lt;ffffffff803e6650&gt;] ? dst_output+0x0/0x10
 [&lt;ffffffff803e922c&gt;] ip_finish_output+0x4c/0x60
 [&lt;ffffffff803e92e3&gt;] ip_output+0xa3/0xf0
 [&lt;ffffffff803e68d0&gt;] ip_local_out+0x20/0x30
 [&lt;ffffffff803e753f&gt;] ip_push_pending_frames+0x27f/0x400
 [&lt;ffffffff80406313&gt;] udp_push_pending_frames+0x233/0x3d0
 [&lt;ffffffff804067d1&gt;] udp_sendmsg+0x321/0x6f0
 [&lt;ffffffff8040d155&gt;] inet_sendmsg+0x45/0x80
 [&lt;ffffffff803b967f&gt;] sock_sendmsg+0xdf/0x110
 [&lt;ffffffff8024a100&gt;] ? autoremove_wake_function+0x0/0x40
 [&lt;ffffffff80257ce5&gt;] ? validate_chain+0x415/0x1010
 [&lt;ffffffff8027dc10&gt;] ? __do_fault+0x140/0x450
 [&lt;ffffffff802597d0&gt;] ? __lock_acquire+0x260/0x590
 [&lt;ffffffff803b9e55&gt;] ? sockfd_lookup_light+0x45/0x80
 [&lt;ffffffff803ba50a&gt;] sys_sendto+0xea/0x120
 [&lt;ffffffff80428e42&gt;] ? _spin_unlock_irqrestore+0x42/0x80
 [&lt;ffffffff803134bc&gt;] ? __up_read+0x4c/0xb0
 [&lt;ffffffff8024e0c6&gt;] ? up_read+0x26/0x30
 [&lt;ffffffff8020b8bb&gt;] system_call_fastpath+0x16/0x1b

icmp6_sk() is similar.

Signed-off-by: Denis V. Lunev &lt;den@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv6: Fix the return interface index when get it while no message is received.</title>
<updated>2008-08-18T06:21:52+00:00</updated>
<author>
<name>Yang Hongyang</name>
<email>yanghy@cn.fujitsu.com</email>
</author>
<published>2008-08-18T06:21:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=13601cd8e44aab332cedff1d6dc10786ec890b7b'/>
<id>13601cd8e44aab332cedff1d6dc10786ec890b7b</id>
<content type='text'>
When get receiving interface index while no message is received,
the bounded device's index of the socket should be returned.

RFC 3542:
   Issuing getsockopt() for the above options will return the sticky
   option value i.e., the value set with setsockopt().  If no sticky
   option value has been set getsockopt() will return the following
   values:

   -  For the IPV6_PKTINFO option, it will return an in6_pktinfo
      structure with ipi6_addr being in6addr_any and ipi6_ifindex being
      zero.

Signed-off-by: Yang Hongyang &lt;yanghy@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When get receiving interface index while no message is received,
the bounded device's index of the socket should be returned.

RFC 3542:
   Issuing getsockopt() for the above options will return the sticky
   option value i.e., the value set with setsockopt().  If no sticky
   option value has been set getsockopt() will return the following
   values:

   -  For the IPV6_PKTINFO option, it will return an in6_pktinfo
      structure with ipi6_addr being in6addr_any and ipi6_ifindex being
      zero.

Signed-off-by: Yang Hongyang &lt;yanghy@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
