<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/l2tp, branch v3.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 oops in l2tp_eth_create() error path</title>
<updated>2012-11-03T01:56:35+00:00</updated>
<author>
<name>Tom Parkin</name>
<email>tparkin@katalix.com</email>
</author>
<published>2012-10-29T23:41:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=789336360e0a2aeb9750c16ab704a02cbe035e9e'/>
<id>789336360e0a2aeb9750c16ab704a02cbe035e9e</id>
<content type='text'>
When creating an L2TPv3 Ethernet session, if register_netdev() should fail for
any reason (for example, automatic naming for "l2tpeth%d" interfaces hits the
32k-interface limit), the netdev is freed in the error path.  However, the
l2tp_eth_sess structure's dev pointer is left uncleared, and this results in
l2tp_eth_delete() then attempting to unregister the same netdev later in the
session teardown.  This results in an oops.

To avoid this, clear the session dev pointer in the error path.

Signed-off-by: Tom Parkin &lt;tparkin@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>
When creating an L2TPv3 Ethernet session, if register_netdev() should fail for
any reason (for example, automatic naming for "l2tpeth%d" interfaces hits the
32k-interface limit), the netdev is freed in the error path.  However, the
l2tp_eth_sess structure's dev pointer is left uncleared, and this results in
l2tp_eth_delete() then attempting to unregister the same netdev later in the
session teardown.  This results in an oops.

To avoid this, clear the session dev pointer in the error path.

Signed-off-by: Tom Parkin &lt;tparkin@katalix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2012-09-28T18:40:49+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-09-28T18:40:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6a06e5e1bb217be077e1f8ee2745b4c5b1aa02db'/>
<id>6a06e5e1bb217be077e1f8ee2745b4c5b1aa02db</id>
<content type='text'>
Conflicts:
	drivers/net/team/team.c
	drivers/net/usb/qmi_wwan.c
	net/batman-adv/bat_iv_ogm.c
	net/ipv4/fib_frontend.c
	net/ipv4/route.c
	net/l2tp/l2tp_netlink.c

The team, fib_frontend, route, and l2tp_netlink conflicts were simply
overlapping changes.

qmi_wwan and bat_iv_ogm were of the "use HEAD" variety.

With help from Antonio Quartulli.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/net/team/team.c
	drivers/net/usb/qmi_wwan.c
	net/batman-adv/bat_iv_ogm.c
	net/ipv4/fib_frontend.c
	net/ipv4/route.c
	net/l2tp/l2tp_netlink.c

The team, fib_frontend, route, and l2tp_netlink conflicts were simply
overlapping changes.

qmi_wwan and bat_iv_ogm were of the "use HEAD" variety.

With help from Antonio Quartulli.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>l2tp: fix return value check</title>
<updated>2012-09-27T17:18:19+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2012-09-24T18:29:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7f8436a1269eaaf2d0b1054a325eddf4e14cb80d'/>
<id>7f8436a1269eaaf2d0b1054a325eddf4e14cb80d</id>
<content type='text'>
In case of error, the function genlmsg_put() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check should
be replaced with NULL test.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&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>
In case of error, the function genlmsg_put() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check should
be replaced with NULL test.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>l2tp: fix compile error when CONFIG_IPV6=m and CONFIG_L2TP=y</title>
<updated>2012-09-21T16:06:46+00:00</updated>
<author>
<name>Amerigo Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2012-09-20T20:36:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fc18162520b642a46ea556300bfdee80810fc538'/>
<id>fc18162520b642a46ea556300bfdee80810fc538</id>
<content type='text'>
When CONFIG_IPV6=m and CONFIG_L2TP=y, I got the following compile error:

  LD      init/built-in.o
net/built-in.o: In function `l2tp_xmit_core':
l2tp_core.c:(.text+0x147781): undefined reference to `inet6_csk_xmit'
net/built-in.o: In function `l2tp_tunnel_create':
(.text+0x149067): undefined reference to `udpv6_encap_enable'
net/built-in.o: In function `l2tp_ip6_recvmsg':
l2tp_ip6.c:(.text+0x14e991): undefined reference to `ipv6_recv_error'
net/built-in.o: In function `l2tp_ip6_sendmsg':
l2tp_ip6.c:(.text+0x14ec64): undefined reference to `fl6_sock_lookup'
l2tp_ip6.c:(.text+0x14ed6b): undefined reference to `datagram_send_ctl'
l2tp_ip6.c:(.text+0x14eda0): undefined reference to `fl6_sock_lookup'
l2tp_ip6.c:(.text+0x14ede5): undefined reference to `fl6_merge_options'
l2tp_ip6.c:(.text+0x14edf4): undefined reference to `ipv6_fixup_options'
l2tp_ip6.c:(.text+0x14ee5d): undefined reference to `fl6_update_dst'
l2tp_ip6.c:(.text+0x14eea3): undefined reference to `ip6_dst_lookup_flow'
l2tp_ip6.c:(.text+0x14eee7): undefined reference to `ip6_dst_hoplimit'
l2tp_ip6.c:(.text+0x14ef8b): undefined reference to `ip6_append_data'
l2tp_ip6.c:(.text+0x14ef9d): undefined reference to `ip6_flush_pending_frames'
l2tp_ip6.c:(.text+0x14efe2): undefined reference to `ip6_push_pending_frames'
net/built-in.o: In function `l2tp_ip6_destroy_sock':
l2tp_ip6.c:(.text+0x14f090): undefined reference to `ip6_flush_pending_frames'
l2tp_ip6.c:(.text+0x14f0a0): undefined reference to `inet6_destroy_sock'
net/built-in.o: In function `l2tp_ip6_connect':
l2tp_ip6.c:(.text+0x14f14d): undefined reference to `ip6_datagram_connect'
net/built-in.o: In function `l2tp_ip6_bind':
l2tp_ip6.c:(.text+0x14f4fe): undefined reference to `ipv6_chk_addr'
net/built-in.o: In function `l2tp_ip6_init':
l2tp_ip6.c:(.init.text+0x73fa): undefined reference to `inet6_add_protocol'
l2tp_ip6.c:(.init.text+0x740c): undefined reference to `inet6_register_protosw'
net/built-in.o: In function `l2tp_ip6_exit':
l2tp_ip6.c:(.exit.text+0x1954): undefined reference to `inet6_unregister_protosw'
l2tp_ip6.c:(.exit.text+0x1965): undefined reference to `inet6_del_protocol'
net/built-in.o:(.rodata+0xf2d0): undefined reference to `inet6_release'
net/built-in.o:(.rodata+0xf2d8): undefined reference to `inet6_bind'
net/built-in.o:(.rodata+0xf308): undefined reference to `inet6_ioctl'
net/built-in.o:(.data+0x1af40): undefined reference to `ipv6_setsockopt'
net/built-in.o:(.data+0x1af48): undefined reference to `ipv6_getsockopt'
net/built-in.o:(.data+0x1af50): undefined reference to `compat_ipv6_setsockopt'
net/built-in.o:(.data+0x1af58): undefined reference to `compat_ipv6_getsockopt'
make: *** [vmlinux] Error 1

This is due to l2tp uses symbols from IPV6, so when IPV6
is a module, l2tp is not allowed to be builtin.

Cc: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Cong Wang &lt;amwang@redhat.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 CONFIG_IPV6=m and CONFIG_L2TP=y, I got the following compile error:

  LD      init/built-in.o
net/built-in.o: In function `l2tp_xmit_core':
l2tp_core.c:(.text+0x147781): undefined reference to `inet6_csk_xmit'
net/built-in.o: In function `l2tp_tunnel_create':
(.text+0x149067): undefined reference to `udpv6_encap_enable'
net/built-in.o: In function `l2tp_ip6_recvmsg':
l2tp_ip6.c:(.text+0x14e991): undefined reference to `ipv6_recv_error'
net/built-in.o: In function `l2tp_ip6_sendmsg':
l2tp_ip6.c:(.text+0x14ec64): undefined reference to `fl6_sock_lookup'
l2tp_ip6.c:(.text+0x14ed6b): undefined reference to `datagram_send_ctl'
l2tp_ip6.c:(.text+0x14eda0): undefined reference to `fl6_sock_lookup'
l2tp_ip6.c:(.text+0x14ede5): undefined reference to `fl6_merge_options'
l2tp_ip6.c:(.text+0x14edf4): undefined reference to `ipv6_fixup_options'
l2tp_ip6.c:(.text+0x14ee5d): undefined reference to `fl6_update_dst'
l2tp_ip6.c:(.text+0x14eea3): undefined reference to `ip6_dst_lookup_flow'
l2tp_ip6.c:(.text+0x14eee7): undefined reference to `ip6_dst_hoplimit'
l2tp_ip6.c:(.text+0x14ef8b): undefined reference to `ip6_append_data'
l2tp_ip6.c:(.text+0x14ef9d): undefined reference to `ip6_flush_pending_frames'
l2tp_ip6.c:(.text+0x14efe2): undefined reference to `ip6_push_pending_frames'
net/built-in.o: In function `l2tp_ip6_destroy_sock':
l2tp_ip6.c:(.text+0x14f090): undefined reference to `ip6_flush_pending_frames'
l2tp_ip6.c:(.text+0x14f0a0): undefined reference to `inet6_destroy_sock'
net/built-in.o: In function `l2tp_ip6_connect':
l2tp_ip6.c:(.text+0x14f14d): undefined reference to `ip6_datagram_connect'
net/built-in.o: In function `l2tp_ip6_bind':
l2tp_ip6.c:(.text+0x14f4fe): undefined reference to `ipv6_chk_addr'
net/built-in.o: In function `l2tp_ip6_init':
l2tp_ip6.c:(.init.text+0x73fa): undefined reference to `inet6_add_protocol'
l2tp_ip6.c:(.init.text+0x740c): undefined reference to `inet6_register_protosw'
net/built-in.o: In function `l2tp_ip6_exit':
l2tp_ip6.c:(.exit.text+0x1954): undefined reference to `inet6_unregister_protosw'
l2tp_ip6.c:(.exit.text+0x1965): undefined reference to `inet6_del_protocol'
net/built-in.o:(.rodata+0xf2d0): undefined reference to `inet6_release'
net/built-in.o:(.rodata+0xf2d8): undefined reference to `inet6_bind'
net/built-in.o:(.rodata+0xf308): undefined reference to `inet6_ioctl'
net/built-in.o:(.data+0x1af40): undefined reference to `ipv6_setsockopt'
net/built-in.o:(.data+0x1af48): undefined reference to `ipv6_getsockopt'
net/built-in.o:(.data+0x1af50): undefined reference to `compat_ipv6_setsockopt'
net/built-in.o:(.data+0x1af58): undefined reference to `compat_ipv6_getsockopt'
make: *** [vmlinux] Error 1

This is due to l2tp uses symbols from IPV6, so when IPV6
is a module, l2tp is not allowed to be builtin.

Cc: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Cong Wang &lt;amwang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2012-09-15T15:43:53+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-09-15T15:43:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b48b63a1f6e26b0dec2c9f1690396ed4bcb66903'/>
<id>b48b63a1f6e26b0dec2c9f1690396ed4bcb66903</id>
<content type='text'>
Conflicts:
	net/netfilter/nfnetlink_log.c
	net/netfilter/xt_LOG.c

Rather easy conflict resolution, the 'net' tree had bug fixes to make
sure we checked if a socket is a time-wait one or not and elide the
logging code if so.

Whereas on the 'net-next' side we are calculating the UID and GID from
the creds using different interfaces due to the user namespace changes
from Eric Biederman.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	net/netfilter/nfnetlink_log.c
	net/netfilter/xt_LOG.c

Rather easy conflict resolution, the 'net' tree had bug fixes to make
sure we checked if a socket is a time-wait one or not and elide the
logging code if so.

Whereas on the 'net-next' side we are calculating the UID and GID from
the creds using different interfaces due to the user namespace changes
from Eric Biederman.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netlink: Rename pid to portid to avoid confusion</title>
<updated>2012-09-10T19:30:41+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-09-07T20:12:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=15e473046cb6e5d18a4d0057e61d76315230382b'/>
<id>15e473046cb6e5d18a4d0057e61d76315230382b</id>
<content type='text'>
It is a frequent mistake to confuse the netlink port identifier with a
process identifier.  Try to reduce this confusion by renaming fields
that hold port identifiers portid instead of pid.

I have carefully avoided changing the structures exported to
userspace to avoid changing the userspace API.

I have successfully built an allyesconfig kernel with this change.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Acked-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>
It is a frequent mistake to confuse the netlink port identifier with a
process identifier.  Try to reduce this confusion by renaming fields
that hold port identifiers portid instead of pid.

I have carefully avoided changing the structures exported to
userspace to avoid changing the userspace API.

I have successfully built an allyesconfig kernel with this change.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Acked-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>net: qdisc busylock needs lockdep annotations</title>
<updated>2012-09-05T21:49:27+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-09-05T01:02:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=23d3b8bfb8eb20e7d96afa09991e6a5ed1c83164'/>
<id>23d3b8bfb8eb20e7d96afa09991e6a5ed1c83164</id>
<content type='text'>
It seems we need to provide ability for stacked devices
to use specific lock_class_key for sch-&gt;busylock

We could instead default l2tpeth tx_queue_len to 0 (no qdisc), but
a user might use a qdisc anyway.

(So same fixes are probably needed on non LLTX stacked drivers)

Noticed while stressing L2TPV3 setup :

======================================================
 [ INFO: possible circular locking dependency detected ]
 3.6.0-rc3+ #788 Not tainted
 -------------------------------------------------------
 netperf/4660 is trying to acquire lock:
  (l2tpsock){+.-...}, at: [&lt;ffffffffa0208db2&gt;] l2tp_xmit_skb+0x172/0xa50 [l2tp_core]

 but task is already holding lock:
  (&amp;(&amp;sch-&gt;busylock)-&gt;rlock){+.-...}, at: [&lt;ffffffff81596595&gt;] dev_queue_xmit+0xd75/0xe00

 which lock already depends on the new lock.

 the existing dependency chain (in reverse order) is:

 -&gt; #1 (&amp;(&amp;sch-&gt;busylock)-&gt;rlock){+.-...}:
        [&lt;ffffffff810a5df0&gt;] lock_acquire+0x90/0x200
        [&lt;ffffffff817499fc&gt;] _raw_spin_lock_irqsave+0x4c/0x60
        [&lt;ffffffff81074872&gt;] __wake_up+0x32/0x70
        [&lt;ffffffff8136d39e&gt;] tty_wakeup+0x3e/0x80
        [&lt;ffffffff81378fb3&gt;] pty_write+0x73/0x80
        [&lt;ffffffff8136cb4c&gt;] tty_put_char+0x3c/0x40
        [&lt;ffffffff813722b2&gt;] process_echoes+0x142/0x330
        [&lt;ffffffff813742ab&gt;] n_tty_receive_buf+0x8fb/0x1230
        [&lt;ffffffff813777b2&gt;] flush_to_ldisc+0x142/0x1c0
        [&lt;ffffffff81062818&gt;] process_one_work+0x198/0x760
        [&lt;ffffffff81063236&gt;] worker_thread+0x186/0x4b0
        [&lt;ffffffff810694d3&gt;] kthread+0x93/0xa0
        [&lt;ffffffff81753e24&gt;] kernel_thread_helper+0x4/0x10

 -&gt; #0 (l2tpsock){+.-...}:
        [&lt;ffffffff810a5288&gt;] __lock_acquire+0x1628/0x1b10
        [&lt;ffffffff810a5df0&gt;] lock_acquire+0x90/0x200
        [&lt;ffffffff817498c1&gt;] _raw_spin_lock+0x41/0x50
        [&lt;ffffffffa0208db2&gt;] l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
        [&lt;ffffffffa021a802&gt;] l2tp_eth_dev_xmit+0x32/0x60 [l2tp_eth]
        [&lt;ffffffff815952b2&gt;] dev_hard_start_xmit+0x502/0xa70
        [&lt;ffffffff815b63ce&gt;] sch_direct_xmit+0xfe/0x290
        [&lt;ffffffff81595a05&gt;] dev_queue_xmit+0x1e5/0xe00
        [&lt;ffffffff815d9d60&gt;] ip_finish_output+0x3d0/0x890
        [&lt;ffffffff815db019&gt;] ip_output+0x59/0xf0
        [&lt;ffffffff815da36d&gt;] ip_local_out+0x2d/0xa0
        [&lt;ffffffff815da5a3&gt;] ip_queue_xmit+0x1c3/0x680
        [&lt;ffffffff815f4192&gt;] tcp_transmit_skb+0x402/0xa60
        [&lt;ffffffff815f4a94&gt;] tcp_write_xmit+0x1f4/0xa30
        [&lt;ffffffff815f5300&gt;] tcp_push_one+0x30/0x40
        [&lt;ffffffff815e6672&gt;] tcp_sendmsg+0xe82/0x1040
        [&lt;ffffffff81614495&gt;] inet_sendmsg+0x125/0x230
        [&lt;ffffffff81576cdc&gt;] sock_sendmsg+0xdc/0xf0
        [&lt;ffffffff81579ece&gt;] sys_sendto+0xfe/0x130
        [&lt;ffffffff81752c92&gt;] system_call_fastpath+0x16/0x1b
  Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(&amp;(&amp;sch-&gt;busylock)-&gt;rlock);
                                lock(l2tpsock);
                                lock(&amp;(&amp;sch-&gt;busylock)-&gt;rlock);
   lock(l2tpsock);

  *** DEADLOCK ***

 5 locks held by netperf/4660:
  #0:  (sk_lock-AF_INET){+.+.+.}, at: [&lt;ffffffff815e581c&gt;] tcp_sendmsg+0x2c/0x1040
  #1:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffff815da3e0&gt;] ip_queue_xmit+0x0/0x680
  #2:  (rcu_read_lock_bh){.+....}, at: [&lt;ffffffff815d9ac5&gt;] ip_finish_output+0x135/0x890
  #3:  (rcu_read_lock_bh){.+....}, at: [&lt;ffffffff81595820&gt;] dev_queue_xmit+0x0/0xe00
  #4:  (&amp;(&amp;sch-&gt;busylock)-&gt;rlock){+.-...}, at: [&lt;ffffffff81596595&gt;] dev_queue_xmit+0xd75/0xe00

 stack backtrace:
 Pid: 4660, comm: netperf Not tainted 3.6.0-rc3+ #788
 Call Trace:
  [&lt;ffffffff8173dbf8&gt;] print_circular_bug+0x1fb/0x20c
  [&lt;ffffffff810a5288&gt;] __lock_acquire+0x1628/0x1b10
  [&lt;ffffffff810a334b&gt;] ? check_usage+0x9b/0x4d0
  [&lt;ffffffff810a3f44&gt;] ? __lock_acquire+0x2e4/0x1b10
  [&lt;ffffffff810a5df0&gt;] lock_acquire+0x90/0x200
  [&lt;ffffffffa0208db2&gt;] ? l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
  [&lt;ffffffff817498c1&gt;] _raw_spin_lock+0x41/0x50
  [&lt;ffffffffa0208db2&gt;] ? l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
  [&lt;ffffffffa0208db2&gt;] l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
  [&lt;ffffffffa021a802&gt;] l2tp_eth_dev_xmit+0x32/0x60 [l2tp_eth]
  [&lt;ffffffff815952b2&gt;] dev_hard_start_xmit+0x502/0xa70
  [&lt;ffffffff81594e0e&gt;] ? dev_hard_start_xmit+0x5e/0xa70
  [&lt;ffffffff81595961&gt;] ? dev_queue_xmit+0x141/0xe00
  [&lt;ffffffff815b63ce&gt;] sch_direct_xmit+0xfe/0x290
  [&lt;ffffffff81595a05&gt;] dev_queue_xmit+0x1e5/0xe00
  [&lt;ffffffff81595820&gt;] ? dev_hard_start_xmit+0xa70/0xa70
  [&lt;ffffffff815d9d60&gt;] ip_finish_output+0x3d0/0x890
  [&lt;ffffffff815d9ac5&gt;] ? ip_finish_output+0x135/0x890
  [&lt;ffffffff815db019&gt;] ip_output+0x59/0xf0
  [&lt;ffffffff815da36d&gt;] ip_local_out+0x2d/0xa0
  [&lt;ffffffff815da5a3&gt;] ip_queue_xmit+0x1c3/0x680
  [&lt;ffffffff815da3e0&gt;] ? ip_local_out+0xa0/0xa0
  [&lt;ffffffff815f4192&gt;] tcp_transmit_skb+0x402/0xa60
  [&lt;ffffffff815fa25e&gt;] ? tcp_md5_do_lookup+0x18e/0x1a0
  [&lt;ffffffff815f4a94&gt;] tcp_write_xmit+0x1f4/0xa30
  [&lt;ffffffff815f5300&gt;] tcp_push_one+0x30/0x40
  [&lt;ffffffff815e6672&gt;] tcp_sendmsg+0xe82/0x1040
  [&lt;ffffffff81614495&gt;] inet_sendmsg+0x125/0x230
  [&lt;ffffffff81614370&gt;] ? inet_create+0x6b0/0x6b0
  [&lt;ffffffff8157e6e2&gt;] ? sock_update_classid+0xc2/0x3b0
  [&lt;ffffffff8157e750&gt;] ? sock_update_classid+0x130/0x3b0
  [&lt;ffffffff81576cdc&gt;] sock_sendmsg+0xdc/0xf0
  [&lt;ffffffff81162579&gt;] ? fget_light+0x3f9/0x4f0
  [&lt;ffffffff81579ece&gt;] sys_sendto+0xfe/0x130
  [&lt;ffffffff810a69ad&gt;] ? trace_hardirqs_on+0xd/0x10
  [&lt;ffffffff8174a0b0&gt;] ? _raw_spin_unlock_irq+0x30/0x50
  [&lt;ffffffff810757e3&gt;] ? finish_task_switch+0x83/0xf0
  [&lt;ffffffff810757a6&gt;] ? finish_task_switch+0x46/0xf0
  [&lt;ffffffff81752cb7&gt;] ? sysret_check+0x1b/0x56
  [&lt;ffffffff81752c92&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: Eric Dumazet &lt;edumazet@google.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>
It seems we need to provide ability for stacked devices
to use specific lock_class_key for sch-&gt;busylock

We could instead default l2tpeth tx_queue_len to 0 (no qdisc), but
a user might use a qdisc anyway.

(So same fixes are probably needed on non LLTX stacked drivers)

Noticed while stressing L2TPV3 setup :

======================================================
 [ INFO: possible circular locking dependency detected ]
 3.6.0-rc3+ #788 Not tainted
 -------------------------------------------------------
 netperf/4660 is trying to acquire lock:
  (l2tpsock){+.-...}, at: [&lt;ffffffffa0208db2&gt;] l2tp_xmit_skb+0x172/0xa50 [l2tp_core]

 but task is already holding lock:
  (&amp;(&amp;sch-&gt;busylock)-&gt;rlock){+.-...}, at: [&lt;ffffffff81596595&gt;] dev_queue_xmit+0xd75/0xe00

 which lock already depends on the new lock.

 the existing dependency chain (in reverse order) is:

 -&gt; #1 (&amp;(&amp;sch-&gt;busylock)-&gt;rlock){+.-...}:
        [&lt;ffffffff810a5df0&gt;] lock_acquire+0x90/0x200
        [&lt;ffffffff817499fc&gt;] _raw_spin_lock_irqsave+0x4c/0x60
        [&lt;ffffffff81074872&gt;] __wake_up+0x32/0x70
        [&lt;ffffffff8136d39e&gt;] tty_wakeup+0x3e/0x80
        [&lt;ffffffff81378fb3&gt;] pty_write+0x73/0x80
        [&lt;ffffffff8136cb4c&gt;] tty_put_char+0x3c/0x40
        [&lt;ffffffff813722b2&gt;] process_echoes+0x142/0x330
        [&lt;ffffffff813742ab&gt;] n_tty_receive_buf+0x8fb/0x1230
        [&lt;ffffffff813777b2&gt;] flush_to_ldisc+0x142/0x1c0
        [&lt;ffffffff81062818&gt;] process_one_work+0x198/0x760
        [&lt;ffffffff81063236&gt;] worker_thread+0x186/0x4b0
        [&lt;ffffffff810694d3&gt;] kthread+0x93/0xa0
        [&lt;ffffffff81753e24&gt;] kernel_thread_helper+0x4/0x10

 -&gt; #0 (l2tpsock){+.-...}:
        [&lt;ffffffff810a5288&gt;] __lock_acquire+0x1628/0x1b10
        [&lt;ffffffff810a5df0&gt;] lock_acquire+0x90/0x200
        [&lt;ffffffff817498c1&gt;] _raw_spin_lock+0x41/0x50
        [&lt;ffffffffa0208db2&gt;] l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
        [&lt;ffffffffa021a802&gt;] l2tp_eth_dev_xmit+0x32/0x60 [l2tp_eth]
        [&lt;ffffffff815952b2&gt;] dev_hard_start_xmit+0x502/0xa70
        [&lt;ffffffff815b63ce&gt;] sch_direct_xmit+0xfe/0x290
        [&lt;ffffffff81595a05&gt;] dev_queue_xmit+0x1e5/0xe00
        [&lt;ffffffff815d9d60&gt;] ip_finish_output+0x3d0/0x890
        [&lt;ffffffff815db019&gt;] ip_output+0x59/0xf0
        [&lt;ffffffff815da36d&gt;] ip_local_out+0x2d/0xa0
        [&lt;ffffffff815da5a3&gt;] ip_queue_xmit+0x1c3/0x680
        [&lt;ffffffff815f4192&gt;] tcp_transmit_skb+0x402/0xa60
        [&lt;ffffffff815f4a94&gt;] tcp_write_xmit+0x1f4/0xa30
        [&lt;ffffffff815f5300&gt;] tcp_push_one+0x30/0x40
        [&lt;ffffffff815e6672&gt;] tcp_sendmsg+0xe82/0x1040
        [&lt;ffffffff81614495&gt;] inet_sendmsg+0x125/0x230
        [&lt;ffffffff81576cdc&gt;] sock_sendmsg+0xdc/0xf0
        [&lt;ffffffff81579ece&gt;] sys_sendto+0xfe/0x130
        [&lt;ffffffff81752c92&gt;] system_call_fastpath+0x16/0x1b
  Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(&amp;(&amp;sch-&gt;busylock)-&gt;rlock);
                                lock(l2tpsock);
                                lock(&amp;(&amp;sch-&gt;busylock)-&gt;rlock);
   lock(l2tpsock);

  *** DEADLOCK ***

 5 locks held by netperf/4660:
  #0:  (sk_lock-AF_INET){+.+.+.}, at: [&lt;ffffffff815e581c&gt;] tcp_sendmsg+0x2c/0x1040
  #1:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffff815da3e0&gt;] ip_queue_xmit+0x0/0x680
  #2:  (rcu_read_lock_bh){.+....}, at: [&lt;ffffffff815d9ac5&gt;] ip_finish_output+0x135/0x890
  #3:  (rcu_read_lock_bh){.+....}, at: [&lt;ffffffff81595820&gt;] dev_queue_xmit+0x0/0xe00
  #4:  (&amp;(&amp;sch-&gt;busylock)-&gt;rlock){+.-...}, at: [&lt;ffffffff81596595&gt;] dev_queue_xmit+0xd75/0xe00

 stack backtrace:
 Pid: 4660, comm: netperf Not tainted 3.6.0-rc3+ #788
 Call Trace:
  [&lt;ffffffff8173dbf8&gt;] print_circular_bug+0x1fb/0x20c
  [&lt;ffffffff810a5288&gt;] __lock_acquire+0x1628/0x1b10
  [&lt;ffffffff810a334b&gt;] ? check_usage+0x9b/0x4d0
  [&lt;ffffffff810a3f44&gt;] ? __lock_acquire+0x2e4/0x1b10
  [&lt;ffffffff810a5df0&gt;] lock_acquire+0x90/0x200
  [&lt;ffffffffa0208db2&gt;] ? l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
  [&lt;ffffffff817498c1&gt;] _raw_spin_lock+0x41/0x50
  [&lt;ffffffffa0208db2&gt;] ? l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
  [&lt;ffffffffa0208db2&gt;] l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
  [&lt;ffffffffa021a802&gt;] l2tp_eth_dev_xmit+0x32/0x60 [l2tp_eth]
  [&lt;ffffffff815952b2&gt;] dev_hard_start_xmit+0x502/0xa70
  [&lt;ffffffff81594e0e&gt;] ? dev_hard_start_xmit+0x5e/0xa70
  [&lt;ffffffff81595961&gt;] ? dev_queue_xmit+0x141/0xe00
  [&lt;ffffffff815b63ce&gt;] sch_direct_xmit+0xfe/0x290
  [&lt;ffffffff81595a05&gt;] dev_queue_xmit+0x1e5/0xe00
  [&lt;ffffffff81595820&gt;] ? dev_hard_start_xmit+0xa70/0xa70
  [&lt;ffffffff815d9d60&gt;] ip_finish_output+0x3d0/0x890
  [&lt;ffffffff815d9ac5&gt;] ? ip_finish_output+0x135/0x890
  [&lt;ffffffff815db019&gt;] ip_output+0x59/0xf0
  [&lt;ffffffff815da36d&gt;] ip_local_out+0x2d/0xa0
  [&lt;ffffffff815da5a3&gt;] ip_queue_xmit+0x1c3/0x680
  [&lt;ffffffff815da3e0&gt;] ? ip_local_out+0xa0/0xa0
  [&lt;ffffffff815f4192&gt;] tcp_transmit_skb+0x402/0xa60
  [&lt;ffffffff815fa25e&gt;] ? tcp_md5_do_lookup+0x18e/0x1a0
  [&lt;ffffffff815f4a94&gt;] tcp_write_xmit+0x1f4/0xa30
  [&lt;ffffffff815f5300&gt;] tcp_push_one+0x30/0x40
  [&lt;ffffffff815e6672&gt;] tcp_sendmsg+0xe82/0x1040
  [&lt;ffffffff81614495&gt;] inet_sendmsg+0x125/0x230
  [&lt;ffffffff81614370&gt;] ? inet_create+0x6b0/0x6b0
  [&lt;ffffffff8157e6e2&gt;] ? sock_update_classid+0xc2/0x3b0
  [&lt;ffffffff8157e750&gt;] ? sock_update_classid+0x130/0x3b0
  [&lt;ffffffff81576cdc&gt;] sock_sendmsg+0xdc/0xf0
  [&lt;ffffffff81162579&gt;] ? fget_light+0x3f9/0x4f0
  [&lt;ffffffff81579ece&gt;] sys_sendto+0xfe/0x130
  [&lt;ffffffff810a69ad&gt;] ? trace_hardirqs_on+0xd/0x10
  [&lt;ffffffff8174a0b0&gt;] ? _raw_spin_unlock_irq+0x30/0x50
  [&lt;ffffffff810757e3&gt;] ? finish_task_switch+0x83/0xf0
  [&lt;ffffffff810757a6&gt;] ? finish_task_switch+0x46/0xf0
  [&lt;ffffffff81752cb7&gt;] ? sysret_check+0x1b/0x56
  [&lt;ffffffff81752c92&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>l2tp: fix a typo in l2tp_eth_dev_recv()</title>
<updated>2012-09-04T19:54:55+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=c0cc88a7627c333de50b07b7c60b1d49d9d2e6cc'/>
<id>c0cc88a7627c333de50b07b7c60b1d49d9d2e6cc</id>
<content type='text'>
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>l2tp: fix a lockdep splat</title>
<updated>2012-09-04T18:07:50+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-09-04T07:18:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=37159ef2c1ae1e696b24b260b241209a19f92c60'/>
<id>37159ef2c1ae1e696b24b260b241209a19f92c60</id>
<content type='text'>
Fixes following lockdep splat :

[ 1614.734896] =============================================
[ 1614.734898] [ INFO: possible recursive locking detected ]
[ 1614.734901] 3.6.0-rc3+ #782 Not tainted
[ 1614.734903] ---------------------------------------------
[ 1614.734905] swapper/11/0 is trying to acquire lock:
[ 1614.734907]  (slock-AF_INET){+.-...}, at: [&lt;ffffffffa0209d72&gt;] l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
[ 1614.734920]
[ 1614.734920] but task is already holding lock:
[ 1614.734922]  (slock-AF_INET){+.-...}, at: [&lt;ffffffff815fce23&gt;] tcp_v4_err+0x163/0x6b0
[ 1614.734932]
[ 1614.734932] other info that might help us debug this:
[ 1614.734935]  Possible unsafe locking scenario:
[ 1614.734935]
[ 1614.734937]        CPU0
[ 1614.734938]        ----
[ 1614.734940]   lock(slock-AF_INET);
[ 1614.734943]   lock(slock-AF_INET);
[ 1614.734946]
[ 1614.734946]  *** DEADLOCK ***
[ 1614.734946]
[ 1614.734949]  May be due to missing lock nesting notation
[ 1614.734949]
[ 1614.734952] 7 locks held by swapper/11/0:
[ 1614.734954]  #0:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffff81592801&gt;] __netif_receive_skb+0x251/0xd00
[ 1614.734964]  #1:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffff815d319c&gt;] ip_local_deliver_finish+0x4c/0x4e0
[ 1614.734972]  #2:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffff8160d116&gt;] icmp_socket_deliver+0x46/0x230
[ 1614.734982]  #3:  (slock-AF_INET){+.-...}, at: [&lt;ffffffff815fce23&gt;] tcp_v4_err+0x163/0x6b0
[ 1614.734989]  #4:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffff815da240&gt;] ip_queue_xmit+0x0/0x680
[ 1614.734997]  #5:  (rcu_read_lock_bh){.+....}, at: [&lt;ffffffff815d9925&gt;] ip_finish_output+0x135/0x890
[ 1614.735004]  #6:  (rcu_read_lock_bh){.+....}, at: [&lt;ffffffff81595680&gt;] dev_queue_xmit+0x0/0xe00
[ 1614.735012]
[ 1614.735012] stack backtrace:
[ 1614.735016] Pid: 0, comm: swapper/11 Not tainted 3.6.0-rc3+ #782
[ 1614.735018] Call Trace:
[ 1614.735020]  &lt;IRQ&gt;  [&lt;ffffffff810a50ac&gt;] __lock_acquire+0x144c/0x1b10
[ 1614.735033]  [&lt;ffffffff810a334b&gt;] ? check_usage+0x9b/0x4d0
[ 1614.735037]  [&lt;ffffffff810a6762&gt;] ? mark_held_locks+0x82/0x130
[ 1614.735042]  [&lt;ffffffff810a5df0&gt;] lock_acquire+0x90/0x200
[ 1614.735047]  [&lt;ffffffffa0209d72&gt;] ? l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
[ 1614.735051]  [&lt;ffffffff810a69ad&gt;] ? trace_hardirqs_on+0xd/0x10
[ 1614.735060]  [&lt;ffffffff81749b31&gt;] _raw_spin_lock+0x41/0x50
[ 1614.735065]  [&lt;ffffffffa0209d72&gt;] ? l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
[ 1614.735069]  [&lt;ffffffffa0209d72&gt;] l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
[ 1614.735075]  [&lt;ffffffffa014f7f2&gt;] l2tp_eth_dev_xmit+0x32/0x60 [l2tp_eth]
[ 1614.735079]  [&lt;ffffffff81595112&gt;] dev_hard_start_xmit+0x502/0xa70
[ 1614.735083]  [&lt;ffffffff81594c6e&gt;] ? dev_hard_start_xmit+0x5e/0xa70
[ 1614.735087]  [&lt;ffffffff815957c1&gt;] ? dev_queue_xmit+0x141/0xe00
[ 1614.735093]  [&lt;ffffffff815b622e&gt;] sch_direct_xmit+0xfe/0x290
[ 1614.735098]  [&lt;ffffffff81595865&gt;] dev_queue_xmit+0x1e5/0xe00
[ 1614.735102]  [&lt;ffffffff81595680&gt;] ? dev_hard_start_xmit+0xa70/0xa70
[ 1614.735106]  [&lt;ffffffff815b4daa&gt;] ? eth_header+0x3a/0xf0
[ 1614.735111]  [&lt;ffffffff8161d33e&gt;] ? fib_get_table+0x2e/0x280
[ 1614.735117]  [&lt;ffffffff8160a7e2&gt;] arp_xmit+0x22/0x60
[ 1614.735121]  [&lt;ffffffff8160a863&gt;] arp_send+0x43/0x50
[ 1614.735125]  [&lt;ffffffff8160b82f&gt;] arp_solicit+0x18f/0x450
[ 1614.735132]  [&lt;ffffffff8159d9da&gt;] neigh_probe+0x4a/0x70
[ 1614.735137]  [&lt;ffffffff815a191a&gt;] __neigh_event_send+0xea/0x300
[ 1614.735141]  [&lt;ffffffff815a1c93&gt;] neigh_resolve_output+0x163/0x260
[ 1614.735146]  [&lt;ffffffff815d9cf5&gt;] ip_finish_output+0x505/0x890
[ 1614.735150]  [&lt;ffffffff815d9925&gt;] ? ip_finish_output+0x135/0x890
[ 1614.735154]  [&lt;ffffffff815dae79&gt;] ip_output+0x59/0xf0
[ 1614.735158]  [&lt;ffffffff815da1cd&gt;] ip_local_out+0x2d/0xa0
[ 1614.735162]  [&lt;ffffffff815da403&gt;] ip_queue_xmit+0x1c3/0x680
[ 1614.735165]  [&lt;ffffffff815da240&gt;] ? ip_local_out+0xa0/0xa0
[ 1614.735172]  [&lt;ffffffff815f4402&gt;] tcp_transmit_skb+0x402/0xa60
[ 1614.735177]  [&lt;ffffffff815f5a11&gt;] tcp_retransmit_skb+0x1a1/0x620
[ 1614.735181]  [&lt;ffffffff815f7e93&gt;] tcp_retransmit_timer+0x393/0x960
[ 1614.735185]  [&lt;ffffffff815fce23&gt;] ? tcp_v4_err+0x163/0x6b0
[ 1614.735189]  [&lt;ffffffff815fd317&gt;] tcp_v4_err+0x657/0x6b0
[ 1614.735194]  [&lt;ffffffff8160d116&gt;] ? icmp_socket_deliver+0x46/0x230
[ 1614.735199]  [&lt;ffffffff8160d19e&gt;] icmp_socket_deliver+0xce/0x230
[ 1614.735203]  [&lt;ffffffff8160d116&gt;] ? icmp_socket_deliver+0x46/0x230
[ 1614.735208]  [&lt;ffffffff8160d464&gt;] icmp_unreach+0xe4/0x2c0
[ 1614.735213]  [&lt;ffffffff8160e520&gt;] icmp_rcv+0x350/0x4a0
[ 1614.735217]  [&lt;ffffffff815d3285&gt;] ip_local_deliver_finish+0x135/0x4e0
[ 1614.735221]  [&lt;ffffffff815d319c&gt;] ? ip_local_deliver_finish+0x4c/0x4e0
[ 1614.735225]  [&lt;ffffffff815d3ffa&gt;] ip_local_deliver+0x4a/0x90
[ 1614.735229]  [&lt;ffffffff815d37b7&gt;] ip_rcv_finish+0x187/0x730
[ 1614.735233]  [&lt;ffffffff815d425d&gt;] ip_rcv+0x21d/0x300
[ 1614.735237]  [&lt;ffffffff81592a1b&gt;] __netif_receive_skb+0x46b/0xd00
[ 1614.735241]  [&lt;ffffffff81592801&gt;] ? __netif_receive_skb+0x251/0xd00
[ 1614.735245]  [&lt;ffffffff81593368&gt;] process_backlog+0xb8/0x180
[ 1614.735249]  [&lt;ffffffff81593cf9&gt;] net_rx_action+0x159/0x330
[ 1614.735257]  [&lt;ffffffff810491f0&gt;] __do_softirq+0xd0/0x3e0
[ 1614.735264]  [&lt;ffffffff8109ed24&gt;] ? tick_program_event+0x24/0x30
[ 1614.735270]  [&lt;ffffffff8175419c&gt;] call_softirq+0x1c/0x30
[ 1614.735278]  [&lt;ffffffff8100425d&gt;] do_softirq+0x8d/0xc0
[ 1614.735282]  [&lt;ffffffff8104983e&gt;] irq_exit+0xae/0xe0
[ 1614.735287]  [&lt;ffffffff8175494e&gt;] smp_apic_timer_interrupt+0x6e/0x99
[ 1614.735291]  [&lt;ffffffff81753a1c&gt;] apic_timer_interrupt+0x6c/0x80
[ 1614.735293]  &lt;EOI&gt;  [&lt;ffffffff810a14ad&gt;] ? trace_hardirqs_off+0xd/0x10
[ 1614.735306]  [&lt;ffffffff81336f85&gt;] ? intel_idle+0xf5/0x150
[ 1614.735310]  [&lt;ffffffff81336f7e&gt;] ? intel_idle+0xee/0x150
[ 1614.735317]  [&lt;ffffffff814e6ea9&gt;] cpuidle_enter+0x19/0x20
[ 1614.735321]  [&lt;ffffffff814e7538&gt;] cpuidle_idle_call+0xa8/0x630
[ 1614.735327]  [&lt;ffffffff8100c1ba&gt;] cpu_idle+0x8a/0xe0
[ 1614.735333]  [&lt;ffffffff8173762e&gt;] start_secondary+0x220/0x222

Signed-off-by: Eric Dumazet &lt;edumazet@google.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>
Fixes following lockdep splat :

[ 1614.734896] =============================================
[ 1614.734898] [ INFO: possible recursive locking detected ]
[ 1614.734901] 3.6.0-rc3+ #782 Not tainted
[ 1614.734903] ---------------------------------------------
[ 1614.734905] swapper/11/0 is trying to acquire lock:
[ 1614.734907]  (slock-AF_INET){+.-...}, at: [&lt;ffffffffa0209d72&gt;] l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
[ 1614.734920]
[ 1614.734920] but task is already holding lock:
[ 1614.734922]  (slock-AF_INET){+.-...}, at: [&lt;ffffffff815fce23&gt;] tcp_v4_err+0x163/0x6b0
[ 1614.734932]
[ 1614.734932] other info that might help us debug this:
[ 1614.734935]  Possible unsafe locking scenario:
[ 1614.734935]
[ 1614.734937]        CPU0
[ 1614.734938]        ----
[ 1614.734940]   lock(slock-AF_INET);
[ 1614.734943]   lock(slock-AF_INET);
[ 1614.734946]
[ 1614.734946]  *** DEADLOCK ***
[ 1614.734946]
[ 1614.734949]  May be due to missing lock nesting notation
[ 1614.734949]
[ 1614.734952] 7 locks held by swapper/11/0:
[ 1614.734954]  #0:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffff81592801&gt;] __netif_receive_skb+0x251/0xd00
[ 1614.734964]  #1:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffff815d319c&gt;] ip_local_deliver_finish+0x4c/0x4e0
[ 1614.734972]  #2:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffff8160d116&gt;] icmp_socket_deliver+0x46/0x230
[ 1614.734982]  #3:  (slock-AF_INET){+.-...}, at: [&lt;ffffffff815fce23&gt;] tcp_v4_err+0x163/0x6b0
[ 1614.734989]  #4:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffff815da240&gt;] ip_queue_xmit+0x0/0x680
[ 1614.734997]  #5:  (rcu_read_lock_bh){.+....}, at: [&lt;ffffffff815d9925&gt;] ip_finish_output+0x135/0x890
[ 1614.735004]  #6:  (rcu_read_lock_bh){.+....}, at: [&lt;ffffffff81595680&gt;] dev_queue_xmit+0x0/0xe00
[ 1614.735012]
[ 1614.735012] stack backtrace:
[ 1614.735016] Pid: 0, comm: swapper/11 Not tainted 3.6.0-rc3+ #782
[ 1614.735018] Call Trace:
[ 1614.735020]  &lt;IRQ&gt;  [&lt;ffffffff810a50ac&gt;] __lock_acquire+0x144c/0x1b10
[ 1614.735033]  [&lt;ffffffff810a334b&gt;] ? check_usage+0x9b/0x4d0
[ 1614.735037]  [&lt;ffffffff810a6762&gt;] ? mark_held_locks+0x82/0x130
[ 1614.735042]  [&lt;ffffffff810a5df0&gt;] lock_acquire+0x90/0x200
[ 1614.735047]  [&lt;ffffffffa0209d72&gt;] ? l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
[ 1614.735051]  [&lt;ffffffff810a69ad&gt;] ? trace_hardirqs_on+0xd/0x10
[ 1614.735060]  [&lt;ffffffff81749b31&gt;] _raw_spin_lock+0x41/0x50
[ 1614.735065]  [&lt;ffffffffa0209d72&gt;] ? l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
[ 1614.735069]  [&lt;ffffffffa0209d72&gt;] l2tp_xmit_skb+0x172/0xa50 [l2tp_core]
[ 1614.735075]  [&lt;ffffffffa014f7f2&gt;] l2tp_eth_dev_xmit+0x32/0x60 [l2tp_eth]
[ 1614.735079]  [&lt;ffffffff81595112&gt;] dev_hard_start_xmit+0x502/0xa70
[ 1614.735083]  [&lt;ffffffff81594c6e&gt;] ? dev_hard_start_xmit+0x5e/0xa70
[ 1614.735087]  [&lt;ffffffff815957c1&gt;] ? dev_queue_xmit+0x141/0xe00
[ 1614.735093]  [&lt;ffffffff815b622e&gt;] sch_direct_xmit+0xfe/0x290
[ 1614.735098]  [&lt;ffffffff81595865&gt;] dev_queue_xmit+0x1e5/0xe00
[ 1614.735102]  [&lt;ffffffff81595680&gt;] ? dev_hard_start_xmit+0xa70/0xa70
[ 1614.735106]  [&lt;ffffffff815b4daa&gt;] ? eth_header+0x3a/0xf0
[ 1614.735111]  [&lt;ffffffff8161d33e&gt;] ? fib_get_table+0x2e/0x280
[ 1614.735117]  [&lt;ffffffff8160a7e2&gt;] arp_xmit+0x22/0x60
[ 1614.735121]  [&lt;ffffffff8160a863&gt;] arp_send+0x43/0x50
[ 1614.735125]  [&lt;ffffffff8160b82f&gt;] arp_solicit+0x18f/0x450
[ 1614.735132]  [&lt;ffffffff8159d9da&gt;] neigh_probe+0x4a/0x70
[ 1614.735137]  [&lt;ffffffff815a191a&gt;] __neigh_event_send+0xea/0x300
[ 1614.735141]  [&lt;ffffffff815a1c93&gt;] neigh_resolve_output+0x163/0x260
[ 1614.735146]  [&lt;ffffffff815d9cf5&gt;] ip_finish_output+0x505/0x890
[ 1614.735150]  [&lt;ffffffff815d9925&gt;] ? ip_finish_output+0x135/0x890
[ 1614.735154]  [&lt;ffffffff815dae79&gt;] ip_output+0x59/0xf0
[ 1614.735158]  [&lt;ffffffff815da1cd&gt;] ip_local_out+0x2d/0xa0
[ 1614.735162]  [&lt;ffffffff815da403&gt;] ip_queue_xmit+0x1c3/0x680
[ 1614.735165]  [&lt;ffffffff815da240&gt;] ? ip_local_out+0xa0/0xa0
[ 1614.735172]  [&lt;ffffffff815f4402&gt;] tcp_transmit_skb+0x402/0xa60
[ 1614.735177]  [&lt;ffffffff815f5a11&gt;] tcp_retransmit_skb+0x1a1/0x620
[ 1614.735181]  [&lt;ffffffff815f7e93&gt;] tcp_retransmit_timer+0x393/0x960
[ 1614.735185]  [&lt;ffffffff815fce23&gt;] ? tcp_v4_err+0x163/0x6b0
[ 1614.735189]  [&lt;ffffffff815fd317&gt;] tcp_v4_err+0x657/0x6b0
[ 1614.735194]  [&lt;ffffffff8160d116&gt;] ? icmp_socket_deliver+0x46/0x230
[ 1614.735199]  [&lt;ffffffff8160d19e&gt;] icmp_socket_deliver+0xce/0x230
[ 1614.735203]  [&lt;ffffffff8160d116&gt;] ? icmp_socket_deliver+0x46/0x230
[ 1614.735208]  [&lt;ffffffff8160d464&gt;] icmp_unreach+0xe4/0x2c0
[ 1614.735213]  [&lt;ffffffff8160e520&gt;] icmp_rcv+0x350/0x4a0
[ 1614.735217]  [&lt;ffffffff815d3285&gt;] ip_local_deliver_finish+0x135/0x4e0
[ 1614.735221]  [&lt;ffffffff815d319c&gt;] ? ip_local_deliver_finish+0x4c/0x4e0
[ 1614.735225]  [&lt;ffffffff815d3ffa&gt;] ip_local_deliver+0x4a/0x90
[ 1614.735229]  [&lt;ffffffff815d37b7&gt;] ip_rcv_finish+0x187/0x730
[ 1614.735233]  [&lt;ffffffff815d425d&gt;] ip_rcv+0x21d/0x300
[ 1614.735237]  [&lt;ffffffff81592a1b&gt;] __netif_receive_skb+0x46b/0xd00
[ 1614.735241]  [&lt;ffffffff81592801&gt;] ? __netif_receive_skb+0x251/0xd00
[ 1614.735245]  [&lt;ffffffff81593368&gt;] process_backlog+0xb8/0x180
[ 1614.735249]  [&lt;ffffffff81593cf9&gt;] net_rx_action+0x159/0x330
[ 1614.735257]  [&lt;ffffffff810491f0&gt;] __do_softirq+0xd0/0x3e0
[ 1614.735264]  [&lt;ffffffff8109ed24&gt;] ? tick_program_event+0x24/0x30
[ 1614.735270]  [&lt;ffffffff8175419c&gt;] call_softirq+0x1c/0x30
[ 1614.735278]  [&lt;ffffffff8100425d&gt;] do_softirq+0x8d/0xc0
[ 1614.735282]  [&lt;ffffffff8104983e&gt;] irq_exit+0xae/0xe0
[ 1614.735287]  [&lt;ffffffff8175494e&gt;] smp_apic_timer_interrupt+0x6e/0x99
[ 1614.735291]  [&lt;ffffffff81753a1c&gt;] apic_timer_interrupt+0x6c/0x80
[ 1614.735293]  &lt;EOI&gt;  [&lt;ffffffff810a14ad&gt;] ? trace_hardirqs_off+0xd/0x10
[ 1614.735306]  [&lt;ffffffff81336f85&gt;] ? intel_idle+0xf5/0x150
[ 1614.735310]  [&lt;ffffffff81336f7e&gt;] ? intel_idle+0xee/0x150
[ 1614.735317]  [&lt;ffffffff814e6ea9&gt;] cpuidle_enter+0x19/0x20
[ 1614.735321]  [&lt;ffffffff814e7538&gt;] cpuidle_idle_call+0xa8/0x630
[ 1614.735327]  [&lt;ffffffff8100c1ba&gt;] cpu_idle+0x8a/0xe0
[ 1614.735333]  [&lt;ffffffff8173762e&gt;] start_secondary+0x220/0x222

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>l2tp: avoid to use synchronize_rcu in tunnel free function</title>
<updated>2012-08-30T16:31:03+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=99469c32f79a32d8481f87be0d3c66dad286f4ec'/>
<id>99469c32f79a32d8481f87be0d3c66dad286f4ec</id>
<content type='text'>
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
</feed>
