<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/l2tp, branch v3.5.7</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>l2tp: fix a typo in l2tp_eth_dev_recv()</title>
<updated>2012-10-12T20:47:04+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-09-04T19:54:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e3b5998c0a9ba5528751c293bf3c3a1ee24dd891'/>
<id>e3b5998c0a9ba5528751c293bf3c3a1ee24dd891</id>
<content type='text'>
[ Upstream commit c0cc88a7627c333de50b07b7c60b1d49d9d2e6cc ]

While investigating l2tp bug, I hit a bug in eth_type_trans(),
because not enough bytes were pulled in skb head.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit c0cc88a7627c333de50b07b7c60b1d49d9d2e6cc ]

While investigating l2tp bug, I hit a bug in eth_type_trans(),
because not enough bytes were pulled in skb head.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>l2tp: avoid to use synchronize_rcu in tunnel free function</title>
<updated>2012-10-02T17:38:56+00:00</updated>
<author>
<name>xeb@mail.ru</name>
<email>xeb@mail.ru</email>
</author>
<published>2012-08-24T01:07:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=25a29dec42e8c89e3de2e5d3a8f3e246f3640d06'/>
<id>25a29dec42e8c89e3de2e5d3a8f3e246f3640d06</id>
<content type='text'>
[ Upstream commit 99469c32f79a32d8481f87be0d3c66dad286f4ec ]

Avoid to use synchronize_rcu in l2tp_tunnel_free because context may be
atomic.

Signed-off-by: Dmitry Kozlov &lt;xeb@mail.ru&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 99469c32f79a32d8481f87be0d3c66dad286f4ec ]

Avoid to use synchronize_rcu in l2tp_tunnel_free because context may be
atomic.

Signed-off-by: Dmitry Kozlov &lt;xeb@mail.ru&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>l2tp: fix info leak via getsockname()</title>
<updated>2012-10-02T17:38:42+00:00</updated>
<author>
<name>Mathias Krause</name>
<email>minipli@googlemail.com</email>
</author>
<published>2012-08-15T11:31:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7e0a12a954e7171a68ef653cfa618d579446f9e2'/>
<id>7e0a12a954e7171a68ef653cfa618d579446f9e2</id>
<content type='text'>
[ Upstream commit 04d4fbca1017c11381e7d82acea21dd741e748bc ]

The L2TP code for IPv6 fails to initialize the l2tp_unused member of
struct sockaddr_l2tpip6 and that for leaks two bytes kernel stack via
the getsockname() syscall. Initialize l2tp_unused with 0 to avoid the
info leak.

Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
Cc: James Chapman &lt;jchapman@katalix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 04d4fbca1017c11381e7d82acea21dd741e748bc ]

The L2TP code for IPv6 fails to initialize the l2tp_unused member of
struct sockaddr_l2tpip6 and that for leaks two bytes kernel stack via
the getsockname() syscall. Initialize l2tp_unused with 0 to avoid the
info leak.

Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
Cc: James Chapman &lt;jchapman@katalix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: l2tp_eth: use LLTX to avoid LOCKDEP splats</title>
<updated>2012-06-26T23:42:33+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-06-25T05:35:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a2842a1e66329798d66563b52faec1a299ec4f73'/>
<id>a2842a1e66329798d66563b52faec1a299ec4f73</id>
<content type='text'>
Denys Fedoryshchenko reported a LOCKDEP issue with l2tp code.

[ 8683.927442] ======================================================
[ 8683.927555] [ INFO: possible circular locking dependency detected ]
[ 8683.927672] 3.4.1-build-0061 #14 Not tainted
[ 8683.927782] -------------------------------------------------------
[ 8683.927895] swapper/0/0 is trying to acquire lock:
[ 8683.928007]  (slock-AF_INET){+.-...}, at: [&lt;e0fc73ec&gt;]
l2tp_xmit_skb+0x173/0x47e [l2tp_core]
[ 8683.928121]
[ 8683.928121] but task is already holding lock:
[ 8683.928121]  (_xmit_ETHER#2){+.-...}, at: [&lt;c02f062d&gt;]
sch_direct_xmit+0x36/0x119
[ 8683.928121]
[ 8683.928121] which lock already depends on the new lock.
[ 8683.928121]
[ 8683.928121]
[ 8683.928121] the existing dependency chain (in reverse order) is:
[ 8683.928121]
[ 8683.928121] -&gt; #1 (_xmit_ETHER#2){+.-...}:
[ 8683.928121]        [&lt;c015a561&gt;] lock_acquire+0x71/0x85
[ 8683.928121]        [&lt;c034da2d&gt;] _raw_spin_lock+0x33/0x40
[ 8683.928121]        [&lt;c0304e0c&gt;] ip_send_reply+0xf2/0x1ce
[ 8683.928121]        [&lt;c0317dbc&gt;] tcp_v4_send_reset+0x153/0x16f
[ 8683.928121]        [&lt;c0317f4a&gt;] tcp_v4_do_rcv+0x172/0x194
[ 8683.928121]        [&lt;c031929b&gt;] tcp_v4_rcv+0x387/0x5a0
[ 8683.928121]        [&lt;c03001d0&gt;] ip_local_deliver_finish+0x13a/0x1e9
[ 8683.928121]        [&lt;c0300645&gt;] NF_HOOK.clone.11+0x46/0x4d
[ 8683.928121]        [&lt;c030075b&gt;] ip_local_deliver+0x41/0x45
[ 8683.928121]        [&lt;c03005dd&gt;] ip_rcv_finish+0x31a/0x33c
[ 8683.928121]        [&lt;c0300645&gt;] NF_HOOK.clone.11+0x46/0x4d
[ 8683.928121]        [&lt;c0300960&gt;] ip_rcv+0x201/0x23d
[ 8683.928121]        [&lt;c02de91b&gt;] __netif_receive_skb+0x329/0x378
[ 8683.928121]        [&lt;c02deae8&gt;] netif_receive_skb+0x4e/0x7d
[ 8683.928121]        [&lt;e08d5ef3&gt;] rtl8139_poll+0x243/0x33d [8139too]
[ 8683.928121]        [&lt;c02df103&gt;] net_rx_action+0x90/0x15d
[ 8683.928121]        [&lt;c012b2b5&gt;] __do_softirq+0x7b/0x118
[ 8683.928121]
[ 8683.928121] -&gt; #0 (slock-AF_INET){+.-...}:
[ 8683.928121]        [&lt;c0159f1b&gt;] __lock_acquire+0x9a3/0xc27
[ 8683.928121]        [&lt;c015a561&gt;] lock_acquire+0x71/0x85
[ 8683.928121]        [&lt;c034da2d&gt;] _raw_spin_lock+0x33/0x40
[ 8683.928121]        [&lt;e0fc73ec&gt;] l2tp_xmit_skb+0x173/0x47e
[l2tp_core]
[ 8683.928121]        [&lt;e0fe31fb&gt;] l2tp_eth_dev_xmit+0x1a/0x2f
[l2tp_eth]
[ 8683.928121]        [&lt;c02e01e7&gt;] dev_hard_start_xmit+0x333/0x3f2
[ 8683.928121]        [&lt;c02f064c&gt;] sch_direct_xmit+0x55/0x119
[ 8683.928121]        [&lt;c02e0528&gt;] dev_queue_xmit+0x282/0x418
[ 8683.928121]        [&lt;c031f4fb&gt;] NF_HOOK.clone.19+0x45/0x4c
[ 8683.928121]        [&lt;c031f524&gt;] arp_xmit+0x22/0x24
[ 8683.928121]        [&lt;c031f567&gt;] arp_send+0x41/0x48
[ 8683.928121]        [&lt;c031fa7d&gt;] arp_process+0x289/0x491
[ 8683.928121]        [&lt;c031f4fb&gt;] NF_HOOK.clone.19+0x45/0x4c
[ 8683.928121]        [&lt;c031f7a0&gt;] arp_rcv+0xb1/0xc3
[ 8683.928121]        [&lt;c02de91b&gt;] __netif_receive_skb+0x329/0x378
[ 8683.928121]        [&lt;c02de9d3&gt;] process_backlog+0x69/0x130
[ 8683.928121]        [&lt;c02df103&gt;] net_rx_action+0x90/0x15d
[ 8683.928121]        [&lt;c012b2b5&gt;] __do_softirq+0x7b/0x118
[ 8683.928121]
[ 8683.928121] other info that might help us debug this:
[ 8683.928121]
[ 8683.928121]  Possible unsafe locking scenario:
[ 8683.928121]
[ 8683.928121]        CPU0                    CPU1
[ 8683.928121]        ----                    ----
[ 8683.928121]   lock(_xmit_ETHER#2);
[ 8683.928121]                                lock(slock-AF_INET);
[ 8683.928121]                                lock(_xmit_ETHER#2);
[ 8683.928121]   lock(slock-AF_INET);
[ 8683.928121]
[ 8683.928121]  *** DEADLOCK ***
[ 8683.928121]
[ 8683.928121] 3 locks held by swapper/0/0:
[ 8683.928121]  #0:  (rcu_read_lock){.+.+..}, at: [&lt;c02dbc10&gt;]
rcu_lock_acquire+0x0/0x30
[ 8683.928121]  #1:  (rcu_read_lock_bh){.+....}, at: [&lt;c02dbc10&gt;]
rcu_lock_acquire+0x0/0x30
[ 8683.928121]  #2:  (_xmit_ETHER#2){+.-...}, at: [&lt;c02f062d&gt;]
sch_direct_xmit+0x36/0x119
[ 8683.928121]
[ 8683.928121] stack backtrace:
[ 8683.928121] Pid: 0, comm: swapper/0 Not tainted 3.4.1-build-0061 #14
[ 8683.928121] Call Trace:
[ 8683.928121]  [&lt;c034bdd2&gt;] ? printk+0x18/0x1a
[ 8683.928121]  [&lt;c0158904&gt;] print_circular_bug+0x1ac/0x1b6
[ 8683.928121]  [&lt;c0159f1b&gt;] __lock_acquire+0x9a3/0xc27
[ 8683.928121]  [&lt;c015a561&gt;] lock_acquire+0x71/0x85
[ 8683.928121]  [&lt;e0fc73ec&gt;] ? l2tp_xmit_skb+0x173/0x47e [l2tp_core]
[ 8683.928121]  [&lt;c034da2d&gt;] _raw_spin_lock+0x33/0x40
[ 8683.928121]  [&lt;e0fc73ec&gt;] ? l2tp_xmit_skb+0x173/0x47e [l2tp_core]
[ 8683.928121]  [&lt;e0fc73ec&gt;] l2tp_xmit_skb+0x173/0x47e [l2tp_core]
[ 8683.928121]  [&lt;e0fe31fb&gt;] l2tp_eth_dev_xmit+0x1a/0x2f [l2tp_eth]
[ 8683.928121]  [&lt;c02e01e7&gt;] dev_hard_start_xmit+0x333/0x3f2
[ 8683.928121]  [&lt;c02f064c&gt;] sch_direct_xmit+0x55/0x119
[ 8683.928121]  [&lt;c02e0528&gt;] dev_queue_xmit+0x282/0x418
[ 8683.928121]  [&lt;c02e02a6&gt;] ? dev_hard_start_xmit+0x3f2/0x3f2
[ 8683.928121]  [&lt;c031f4fb&gt;] NF_HOOK.clone.19+0x45/0x4c
[ 8683.928121]  [&lt;c031f524&gt;] arp_xmit+0x22/0x24
[ 8683.928121]  [&lt;c02e02a6&gt;] ? dev_hard_start_xmit+0x3f2/0x3f2
[ 8683.928121]  [&lt;c031f567&gt;] arp_send+0x41/0x48
[ 8683.928121]  [&lt;c031fa7d&gt;] arp_process+0x289/0x491
[ 8683.928121]  [&lt;c031f7f4&gt;] ? __neigh_lookup.clone.20+0x42/0x42
[ 8683.928121]  [&lt;c031f4fb&gt;] NF_HOOK.clone.19+0x45/0x4c
[ 8683.928121]  [&lt;c031f7a0&gt;] arp_rcv+0xb1/0xc3
[ 8683.928121]  [&lt;c031f7f4&gt;] ? __neigh_lookup.clone.20+0x42/0x42
[ 8683.928121]  [&lt;c02de91b&gt;] __netif_receive_skb+0x329/0x378
[ 8683.928121]  [&lt;c02de9d3&gt;] process_backlog+0x69/0x130
[ 8683.928121]  [&lt;c02df103&gt;] net_rx_action+0x90/0x15d
[ 8683.928121]  [&lt;c012b2b5&gt;] __do_softirq+0x7b/0x118
[ 8683.928121]  [&lt;c012b23a&gt;] ? local_bh_enable+0xd/0xd
[ 8683.928121]  &lt;IRQ&gt;  [&lt;c012b4d0&gt;] ? irq_exit+0x41/0x91
[ 8683.928121]  [&lt;c0103c6f&gt;] ? do_IRQ+0x79/0x8d
[ 8683.928121]  [&lt;c0157ea1&gt;] ? trace_hardirqs_off_caller+0x2e/0x86
[ 8683.928121]  [&lt;c034ef6e&gt;] ? common_interrupt+0x2e/0x34
[ 8683.928121]  [&lt;c0108a33&gt;] ? default_idle+0x23/0x38
[ 8683.928121]  [&lt;c01091a8&gt;] ? cpu_idle+0x55/0x6f
[ 8683.928121]  [&lt;c033df25&gt;] ? rest_init+0xa1/0xa7
[ 8683.928121]  [&lt;c033de84&gt;] ? __read_lock_failed+0x14/0x14
[ 8683.928121]  [&lt;c0498745&gt;] ? start_kernel+0x303/0x30a
[ 8683.928121]  [&lt;c0498209&gt;] ? repair_env_string+0x51/0x51
[ 8683.928121]  [&lt;c04980a8&gt;] ? i386_start_kernel+0xa8/0xaf

It appears that like most virtual devices, l2tp should be converted to
LLTX mode.

This patch takes care of statistics using atomic_long in both RX and TX
paths, and fix a bug in l2tp_eth_dev_recv(), which was caching skb-&gt;data
before a pskb_may_pull() call.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Denys Fedoryshchenko &lt;denys@visp.net.lb&gt;
Cc: James Chapman &lt;jchapman@katalix.com&gt;
Cc: Hong zhi guo &lt;honkiko@gmail.com&gt;
Cc: Francois Romieu &lt;romieu@fr.zoreil.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>
Denys Fedoryshchenko reported a LOCKDEP issue with l2tp code.

[ 8683.927442] ======================================================
[ 8683.927555] [ INFO: possible circular locking dependency detected ]
[ 8683.927672] 3.4.1-build-0061 #14 Not tainted
[ 8683.927782] -------------------------------------------------------
[ 8683.927895] swapper/0/0 is trying to acquire lock:
[ 8683.928007]  (slock-AF_INET){+.-...}, at: [&lt;e0fc73ec&gt;]
l2tp_xmit_skb+0x173/0x47e [l2tp_core]
[ 8683.928121]
[ 8683.928121] but task is already holding lock:
[ 8683.928121]  (_xmit_ETHER#2){+.-...}, at: [&lt;c02f062d&gt;]
sch_direct_xmit+0x36/0x119
[ 8683.928121]
[ 8683.928121] which lock already depends on the new lock.
[ 8683.928121]
[ 8683.928121]
[ 8683.928121] the existing dependency chain (in reverse order) is:
[ 8683.928121]
[ 8683.928121] -&gt; #1 (_xmit_ETHER#2){+.-...}:
[ 8683.928121]        [&lt;c015a561&gt;] lock_acquire+0x71/0x85
[ 8683.928121]        [&lt;c034da2d&gt;] _raw_spin_lock+0x33/0x40
[ 8683.928121]        [&lt;c0304e0c&gt;] ip_send_reply+0xf2/0x1ce
[ 8683.928121]        [&lt;c0317dbc&gt;] tcp_v4_send_reset+0x153/0x16f
[ 8683.928121]        [&lt;c0317f4a&gt;] tcp_v4_do_rcv+0x172/0x194
[ 8683.928121]        [&lt;c031929b&gt;] tcp_v4_rcv+0x387/0x5a0
[ 8683.928121]        [&lt;c03001d0&gt;] ip_local_deliver_finish+0x13a/0x1e9
[ 8683.928121]        [&lt;c0300645&gt;] NF_HOOK.clone.11+0x46/0x4d
[ 8683.928121]        [&lt;c030075b&gt;] ip_local_deliver+0x41/0x45
[ 8683.928121]        [&lt;c03005dd&gt;] ip_rcv_finish+0x31a/0x33c
[ 8683.928121]        [&lt;c0300645&gt;] NF_HOOK.clone.11+0x46/0x4d
[ 8683.928121]        [&lt;c0300960&gt;] ip_rcv+0x201/0x23d
[ 8683.928121]        [&lt;c02de91b&gt;] __netif_receive_skb+0x329/0x378
[ 8683.928121]        [&lt;c02deae8&gt;] netif_receive_skb+0x4e/0x7d
[ 8683.928121]        [&lt;e08d5ef3&gt;] rtl8139_poll+0x243/0x33d [8139too]
[ 8683.928121]        [&lt;c02df103&gt;] net_rx_action+0x90/0x15d
[ 8683.928121]        [&lt;c012b2b5&gt;] __do_softirq+0x7b/0x118
[ 8683.928121]
[ 8683.928121] -&gt; #0 (slock-AF_INET){+.-...}:
[ 8683.928121]        [&lt;c0159f1b&gt;] __lock_acquire+0x9a3/0xc27
[ 8683.928121]        [&lt;c015a561&gt;] lock_acquire+0x71/0x85
[ 8683.928121]        [&lt;c034da2d&gt;] _raw_spin_lock+0x33/0x40
[ 8683.928121]        [&lt;e0fc73ec&gt;] l2tp_xmit_skb+0x173/0x47e
[l2tp_core]
[ 8683.928121]        [&lt;e0fe31fb&gt;] l2tp_eth_dev_xmit+0x1a/0x2f
[l2tp_eth]
[ 8683.928121]        [&lt;c02e01e7&gt;] dev_hard_start_xmit+0x333/0x3f2
[ 8683.928121]        [&lt;c02f064c&gt;] sch_direct_xmit+0x55/0x119
[ 8683.928121]        [&lt;c02e0528&gt;] dev_queue_xmit+0x282/0x418
[ 8683.928121]        [&lt;c031f4fb&gt;] NF_HOOK.clone.19+0x45/0x4c
[ 8683.928121]        [&lt;c031f524&gt;] arp_xmit+0x22/0x24
[ 8683.928121]        [&lt;c031f567&gt;] arp_send+0x41/0x48
[ 8683.928121]        [&lt;c031fa7d&gt;] arp_process+0x289/0x491
[ 8683.928121]        [&lt;c031f4fb&gt;] NF_HOOK.clone.19+0x45/0x4c
[ 8683.928121]        [&lt;c031f7a0&gt;] arp_rcv+0xb1/0xc3
[ 8683.928121]        [&lt;c02de91b&gt;] __netif_receive_skb+0x329/0x378
[ 8683.928121]        [&lt;c02de9d3&gt;] process_backlog+0x69/0x130
[ 8683.928121]        [&lt;c02df103&gt;] net_rx_action+0x90/0x15d
[ 8683.928121]        [&lt;c012b2b5&gt;] __do_softirq+0x7b/0x118
[ 8683.928121]
[ 8683.928121] other info that might help us debug this:
[ 8683.928121]
[ 8683.928121]  Possible unsafe locking scenario:
[ 8683.928121]
[ 8683.928121]        CPU0                    CPU1
[ 8683.928121]        ----                    ----
[ 8683.928121]   lock(_xmit_ETHER#2);
[ 8683.928121]                                lock(slock-AF_INET);
[ 8683.928121]                                lock(_xmit_ETHER#2);
[ 8683.928121]   lock(slock-AF_INET);
[ 8683.928121]
[ 8683.928121]  *** DEADLOCK ***
[ 8683.928121]
[ 8683.928121] 3 locks held by swapper/0/0:
[ 8683.928121]  #0:  (rcu_read_lock){.+.+..}, at: [&lt;c02dbc10&gt;]
rcu_lock_acquire+0x0/0x30
[ 8683.928121]  #1:  (rcu_read_lock_bh){.+....}, at: [&lt;c02dbc10&gt;]
rcu_lock_acquire+0x0/0x30
[ 8683.928121]  #2:  (_xmit_ETHER#2){+.-...}, at: [&lt;c02f062d&gt;]
sch_direct_xmit+0x36/0x119
[ 8683.928121]
[ 8683.928121] stack backtrace:
[ 8683.928121] Pid: 0, comm: swapper/0 Not tainted 3.4.1-build-0061 #14
[ 8683.928121] Call Trace:
[ 8683.928121]  [&lt;c034bdd2&gt;] ? printk+0x18/0x1a
[ 8683.928121]  [&lt;c0158904&gt;] print_circular_bug+0x1ac/0x1b6
[ 8683.928121]  [&lt;c0159f1b&gt;] __lock_acquire+0x9a3/0xc27
[ 8683.928121]  [&lt;c015a561&gt;] lock_acquire+0x71/0x85
[ 8683.928121]  [&lt;e0fc73ec&gt;] ? l2tp_xmit_skb+0x173/0x47e [l2tp_core]
[ 8683.928121]  [&lt;c034da2d&gt;] _raw_spin_lock+0x33/0x40
[ 8683.928121]  [&lt;e0fc73ec&gt;] ? l2tp_xmit_skb+0x173/0x47e [l2tp_core]
[ 8683.928121]  [&lt;e0fc73ec&gt;] l2tp_xmit_skb+0x173/0x47e [l2tp_core]
[ 8683.928121]  [&lt;e0fe31fb&gt;] l2tp_eth_dev_xmit+0x1a/0x2f [l2tp_eth]
[ 8683.928121]  [&lt;c02e01e7&gt;] dev_hard_start_xmit+0x333/0x3f2
[ 8683.928121]  [&lt;c02f064c&gt;] sch_direct_xmit+0x55/0x119
[ 8683.928121]  [&lt;c02e0528&gt;] dev_queue_xmit+0x282/0x418
[ 8683.928121]  [&lt;c02e02a6&gt;] ? dev_hard_start_xmit+0x3f2/0x3f2
[ 8683.928121]  [&lt;c031f4fb&gt;] NF_HOOK.clone.19+0x45/0x4c
[ 8683.928121]  [&lt;c031f524&gt;] arp_xmit+0x22/0x24
[ 8683.928121]  [&lt;c02e02a6&gt;] ? dev_hard_start_xmit+0x3f2/0x3f2
[ 8683.928121]  [&lt;c031f567&gt;] arp_send+0x41/0x48
[ 8683.928121]  [&lt;c031fa7d&gt;] arp_process+0x289/0x491
[ 8683.928121]  [&lt;c031f7f4&gt;] ? __neigh_lookup.clone.20+0x42/0x42
[ 8683.928121]  [&lt;c031f4fb&gt;] NF_HOOK.clone.19+0x45/0x4c
[ 8683.928121]  [&lt;c031f7a0&gt;] arp_rcv+0xb1/0xc3
[ 8683.928121]  [&lt;c031f7f4&gt;] ? __neigh_lookup.clone.20+0x42/0x42
[ 8683.928121]  [&lt;c02de91b&gt;] __netif_receive_skb+0x329/0x378
[ 8683.928121]  [&lt;c02de9d3&gt;] process_backlog+0x69/0x130
[ 8683.928121]  [&lt;c02df103&gt;] net_rx_action+0x90/0x15d
[ 8683.928121]  [&lt;c012b2b5&gt;] __do_softirq+0x7b/0x118
[ 8683.928121]  [&lt;c012b23a&gt;] ? local_bh_enable+0xd/0xd
[ 8683.928121]  &lt;IRQ&gt;  [&lt;c012b4d0&gt;] ? irq_exit+0x41/0x91
[ 8683.928121]  [&lt;c0103c6f&gt;] ? do_IRQ+0x79/0x8d
[ 8683.928121]  [&lt;c0157ea1&gt;] ? trace_hardirqs_off_caller+0x2e/0x86
[ 8683.928121]  [&lt;c034ef6e&gt;] ? common_interrupt+0x2e/0x34
[ 8683.928121]  [&lt;c0108a33&gt;] ? default_idle+0x23/0x38
[ 8683.928121]  [&lt;c01091a8&gt;] ? cpu_idle+0x55/0x6f
[ 8683.928121]  [&lt;c033df25&gt;] ? rest_init+0xa1/0xa7
[ 8683.928121]  [&lt;c033de84&gt;] ? __read_lock_failed+0x14/0x14
[ 8683.928121]  [&lt;c0498745&gt;] ? start_kernel+0x303/0x30a
[ 8683.928121]  [&lt;c0498209&gt;] ? repair_env_string+0x51/0x51
[ 8683.928121]  [&lt;c04980a8&gt;] ? i386_start_kernel+0xa8/0xaf

It appears that like most virtual devices, l2tp should be converted to
LLTX mode.

This patch takes care of statistics using atomic_long in both RX and TX
paths, and fix a bug in l2tp_eth_dev_recv(), which was caching skb-&gt;data
before a pskb_may_pull() call.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Denys Fedoryshchenko &lt;denys@visp.net.lb&gt;
Cc: James Chapman &lt;jchapman@katalix.com&gt;
Cc: Hong zhi guo &lt;honkiko@gmail.com&gt;
Cc: Francois Romieu &lt;romieu@fr.zoreil.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: l2tp_eth: fix l2tp_eth_dev_xmit race</title>
<updated>2012-06-25T23:30:54+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-06-25T00:45:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=aa214de0595eecf5079a172a16333fa638b64915'/>
<id>aa214de0595eecf5079a172a16333fa638b64915</id>
<content type='text'>
Its illegal to dereference skb after giving it to l2tp_xmit_skb()
as it might be already freed/reused.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: James Chapman &lt;jchapman@katalix.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>
Its illegal to dereference skb after giving it to l2tp_xmit_skb()
as it might be already freed/reused.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: James Chapman &lt;jchapman@katalix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>l2tp: fix a race in l2tp_ip_sendmsg()</title>
<updated>2012-06-08T21:30:51+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-06-08T06:25:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4399a4df98a63e30fd16e9d0cecc46ea92269e8f'/>
<id>4399a4df98a63e30fd16e9d0cecc46ea92269e8f</id>
<content type='text'>
Commit 081b1b1bb27f (l2tp: fix l2tp_ip_sendmsg() route handling) added
a race, in case IP route cache is disabled.

In this case, we should not do the dst_release(&amp;rt-&gt;dst), since it'll
free the dst immediately, instead of waiting a RCU grace period.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: James Chapman &lt;jchapman@katalix.com&gt;
Cc: Denys Fedoryshchenko &lt;denys@visp.net.lb&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>
Commit 081b1b1bb27f (l2tp: fix l2tp_ip_sendmsg() route handling) added
a race, in case IP route cache is disabled.

In this case, we should not do the dst_release(&amp;rt-&gt;dst), since it'll
free the dst immediately, instead of waiting a RCU grace period.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: James Chapman &lt;jchapman@katalix.com&gt;
Cc: Denys Fedoryshchenko &lt;denys@visp.net.lb&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: l2tp_eth: fix kernel panic on rmmod l2tp_eth</title>
<updated>2012-06-07T20:02:20+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-06-07T00:07:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a06998b88b1651c5f71c0e35f528bf2057188ead'/>
<id>a06998b88b1651c5f71c0e35f528bf2057188ead</id>
<content type='text'>
We must prevent module unloading if some devices are still attached to
l2tp_eth driver.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Denys Fedoryshchenko &lt;denys@visp.net.lb&gt;
Tested-by: Denys Fedoryshchenko &lt;denys@visp.net.lb&gt;
Cc: James Chapman &lt;jchapman@katalix.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>
We must prevent module unloading if some devices are still attached to
l2tp_eth driver.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Denys Fedoryshchenko &lt;denys@visp.net.lb&gt;
Tested-by: Denys Fedoryshchenko &lt;denys@visp.net.lb&gt;
Cc: James Chapman &lt;jchapman@katalix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>genetlink: Build a generic netlink family module alias</title>
<updated>2012-05-30T02:33:56+00:00</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2012-05-29T09:30:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e9412c37082b5c932e83364aaed0c38c2ce33acb'/>
<id>e9412c37082b5c932e83364aaed0c38c2ce33acb</id>
<content type='text'>
Generic netlink searches for -type- formatted aliases when requesting a module to
fulfill a protocol request (i.e. net-pf-16-proto-16-type-&lt;x&gt;, where x is a type
value).  However generic netlink protocols have no well defined type numbers,
they have string names.  Modify genl_ctrl_getfamily to request an alias in the
format net-pf-16-proto-16-family-&lt;x&gt; instead, where x is a generic string, and
add a macro that builds on the previously added MODULE_ALIAS_NET_PF_PROTO_NAME
macro to allow modules to specifify those generic strings.

Note, l2tp previously hacked together an net-pf-16-proto-16-type-l2tp alias
using the MODULE_ALIAS macro, with these updates we can convert that to use the
PROTO_NAME macro.

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
CC: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: James Chapman &lt;jchapman@katalix.com&gt;
CC: David Miller &lt;davem@davemloft.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>
Generic netlink searches for -type- formatted aliases when requesting a module to
fulfill a protocol request (i.e. net-pf-16-proto-16-type-&lt;x&gt;, where x is a type
value).  However generic netlink protocols have no well defined type numbers,
they have string names.  Modify genl_ctrl_getfamily to request an alias in the
format net-pf-16-proto-16-family-&lt;x&gt; instead, where x is a generic string, and
add a macro that builds on the previously added MODULE_ALIAS_NET_PF_PROTO_NAME
macro to allow modules to specifify those generic strings.

Note, l2tp previously hacked together an net-pf-16-proto-16-type-l2tp alias
using the MODULE_ALIAS macro, with these updates we can convert that to use the
PROTO_NAME macro.

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
CC: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: James Chapman &lt;jchapman@katalix.com&gt;
CC: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>l2tp: fix oops in L2TP IP sockets for connect() AF_UNSPEC case</title>
<updated>2012-05-29T21:19:44+00:00</updated>
<author>
<name>James Chapman</name>
<email>jchapman@katalix.com</email>
</author>
<published>2012-05-29T03:30:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c51ce49735c183ef2592db70f918ee698716276b'/>
<id>c51ce49735c183ef2592db70f918ee698716276b</id>
<content type='text'>
An application may call connect() to disconnect a socket using an
address with family AF_UNSPEC. The L2TP IP sockets were not handling
this case when the socket is not bound and an attempt to connect()
using AF_UNSPEC in such cases would result in an oops. This patch
addresses the problem by protecting the sk_prot-&gt;disconnect() call
against trying to unhash the socket before it is bound.

The L2TP IPv4 and IPv6 sockets have the same problem. Both are fixed
by this patch.

The patch also adds more checks that the sockaddr supplied to bind()
and connect() calls is valid.

 RIP: 0010:[&lt;ffffffff82e133b0&gt;]  [&lt;ffffffff82e133b0&gt;] inet_unhash+0x50/0xd0
 RSP: 0018:ffff88001989be28  EFLAGS: 00010293
 Stack:
  ffff8800407a8000 0000000000000000 ffff88001989be78 ffffffff82e3a249
  ffffffff82e3a050 ffff88001989bec8 ffff88001989be88 ffff8800407a8000
  0000000000000010 ffff88001989bec8 ffff88001989bea8 ffffffff82e42639
 Call Trace:
 [&lt;ffffffff82e3a249&gt;] udp_disconnect+0x1f9/0x290
 [&lt;ffffffff82e42639&gt;] inet_dgram_connect+0x29/0x80
 [&lt;ffffffff82d012fc&gt;] sys_connect+0x9c/0x100

Reported-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Signed-off-by: James Chapman &lt;jchapman@katalix.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>
An application may call connect() to disconnect a socket using an
address with family AF_UNSPEC. The L2TP IP sockets were not handling
this case when the socket is not bound and an attempt to connect()
using AF_UNSPEC in such cases would result in an oops. This patch
addresses the problem by protecting the sk_prot-&gt;disconnect() call
against trying to unhash the socket before it is bound.

The L2TP IPv4 and IPv6 sockets have the same problem. Both are fixed
by this patch.

The patch also adds more checks that the sockaddr supplied to bind()
and connect() calls is valid.

 RIP: 0010:[&lt;ffffffff82e133b0&gt;]  [&lt;ffffffff82e133b0&gt;] inet_unhash+0x50/0xd0
 RSP: 0018:ffff88001989be28  EFLAGS: 00010293
 Stack:
  ffff8800407a8000 0000000000000000 ffff88001989be78 ffffffff82e3a249
  ffffffff82e3a050 ffff88001989bec8 ffff88001989be88 ffff8800407a8000
  0000000000000010 ffff88001989bec8 ffff88001989bea8 ffffffff82e42639
 Call Trace:
 [&lt;ffffffff82e3a249&gt;] udp_disconnect+0x1f9/0x290
 [&lt;ffffffff82e42639&gt;] inet_dgram_connect+0x29/0x80
 [&lt;ffffffff82d012fc&gt;] sys_connect+0x9c/0x100

Reported-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Signed-off-by: James Chapman &lt;jchapman@katalix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: l2tp: Standardize logging styles</title>
<updated>2012-05-17T08:34:38+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2012-05-16T09:55:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a4ca44fa578c7c7fd123b7fba3c2c98d4ba4e53d'/>
<id>a4ca44fa578c7c7fd123b7fba3c2c98d4ba4e53d</id>
<content type='text'>
Use more current logging styles.

Add pr_fmt to prefix output appropriately.
Convert printks to pr_&lt;level&gt;.
Convert PRINTK macros to new l2tp_&lt;level&gt; macros.
Neaten some &lt;foo&gt;_refcount debugging macros.
Use print_hex_dump_bytes instead of hand-coded loops.
Coalesce formats and align arguments.

Some KERN_DEBUG output is not now emitted unless
dynamic_debugging is enabled.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: James Chapman &lt;jchapman@katalix.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>
Use more current logging styles.

Add pr_fmt to prefix output appropriately.
Convert printks to pr_&lt;level&gt;.
Convert PRINTK macros to new l2tp_&lt;level&gt; macros.
Neaten some &lt;foo&gt;_refcount debugging macros.
Use print_hex_dump_bytes instead of hand-coded loops.
Coalesce formats and align arguments.

Some KERN_DEBUG output is not now emitted unless
dynamic_debugging is enabled.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: James Chapman &lt;jchapman@katalix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
