* Re: [PATCH v2] net: af_packet: don't call tpacket_destruct_skb() until the skb is sent out
From: Changli Gao @ 2010-09-22 9:24 UTC (permalink / raw)
To: David Miller; +Cc: mst, eric.dumazet, socketcan, netdev
In-Reply-To: <20100914.202023.193706826.davem@davemloft.net>
On Wed, Sep 15, 2010 at 11:20 AM, David Miller <davem@davemloft.net> wrote:
>
>
> Changli, I have one other minor request, please name this something
> like "shinfo->data_destructor" and "shinfo->data_destructor_arg".
>
> I think that will make it easier for other humans to understand :)
>
OK. Thanks.
But there is another issue, when splice() is involved. If we splice
the skbs generated by AF_PACKET socket to a pipe, the fragment pages
will be hold by the pipe, but the skbs are freed, and AF_PACKET socket
will been told that the corresponding TX ring buffers are available
for the other uses wrongly.
--
Regards,
Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply
* Re: [Bugme-new] [Bug 18952] New: The mount of SYN retries is not equal to /proc/sys/net/ipv4/tcp_syn_retries
From: Andrew Morton @ 2010-09-22 9:02 UTC (permalink / raw)
To: netdev; +Cc: bugzilla-daemon, bugme-daemon, yuri
In-Reply-To: <bug-18952-10286@https.bugzilla.kernel.org/>
(switched to email. Please respond via emailed reply-to-all, not via the
bugzilla web interface).
On Wed, 22 Sep 2010 08:50:12 GMT bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=18952
>
> Summary: The mount of SYN retries is not equal to
> /proc/sys/net/ipv4/tcp_syn_retries
> Product: Networking
> Version: 2.5
> Kernel Version: 2.6.32.12, 2.6.32.15, 2.6.35.4
> Platform: All
> OS/Version: Linux
> Tree: Mainline
> Status: NEW
> Severity: normal
> Priority: P1
> Component: IPV4
> AssignedTo: shemminger@linux-foundation.org
> ReportedBy: yuri@itinteg.net
> Regression: No
>
>
> When setting a value in /proc/sys/net/ipv4/tcp_syn_retries, the actual number
> of syn retries is the number set in /proc/sys/net/ipv4/tcp_syn_retries minus
> 2.
>
> For example:
> When setting /proc/sys/net/ipv4/tcp_syn_retries to 5 the actual number of SYN
> retries is 3.
> When setting /proc/sys/net/ipv4/tcp_syn_retries to 7 the actual number of SYN
> retries is 5.
> However, when setting setting /proc/sys/net/ipv4/tcp_syn_retries to 2 the
> actual number of SYN retries is 2.
>
> Note: In the kernel 2.6.31.9 actual number of SYN = tcp_syn_retries + 1
>
>
> Steps to reproduce:
> sudo iptables -I INPUT 1 -i lo -p tcp --dport 88 -j DROP
> sudo tcpdump -n -i lo -v tcp port 88
>
> from another console run:
> time wget -t 1 -O - --connect-timeout=300 http://0:88
>
> tcpdump output:
> sudo tcpdump -n -i lo -v tcp port 88
> 11:29:39.820058 IP (tos 0x0, ttl 64, id 14664, offset 0, flags [DF], proto TCP
> (6), length 60)
> 127.0.0.1.43730 > 127.0.0.1.kerberos: Flags [S], cksum 0xfe30 (incorrect ->
> 0xecf4), seq 1012617667, win 32792, options [mss 16396,sackOK,TS val 12871819
> ecr 0,nop,wscale 7], length 0
> 11:29:42.824091 IP (tos 0x0, ttl 64, id 14665, offset 0, flags [DF], proto TCP
> (6), length 60)
> 127.0.0.1.43730 > 127.0.0.1.kerberos: Flags [S], cksum 0xfe30 (incorrect ->
> 0xe137), seq 1012617667, win 32792, options [mss 16396,sackOK,TS val 12874824
> ecr 0,nop,wscale 7], length 0
> 11:29:48.832153 IP (tos 0x0, ttl 64, id 14666, offset 0, flags [DF], proto TCP
> (6), length 60)
> 127.0.0.1.43730 > 127.0.0.1.kerberos: Flags [S], cksum 0xfe30 (incorrect ->
> 0xc9bf), seq 1012617667, win 32792, options [mss 16396,sackOK,TS val 12880832
> ecr 0,nop,wscale 7], length 0
>
> wget output:
> time wget -t 1 -O - --connect-timeout=300 http://0:88
> Resolving 0... 0.0.0.0
> Connecting to 0|0.0.0.0|:88... failed: Connection timed out.
> Giving up.
>
>
> real 0m21.050s
> user 0m0.003s
> sys 0m0.004s
>
> It valid for remote host also.
>
^ permalink raw reply
* Re: [Bugme-new] [Bug 18942] New: change to include/linux/netdevice.h prevents compilation for ARM architecture with AEABI enabled
From: Andrew Morton @ 2010-09-22 9:01 UTC (permalink / raw)
To: Patrick McHardy; +Cc: bugzilla-daemon, bugme-daemon, netdev, linux-arm-kernel
In-Reply-To: <bug-18942-10286@https.bugzilla.kernel.org/>
(switched to email. Please respond via emailed reply-to-all, not via the
bugzilla web interface).
On Wed, 22 Sep 2010 08:39:05 GMT bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=18942
>
> Summary: change to include/linux/netdevice.h prevents
> compilation for ARM architecture with AEABI enabled
> Product: Platform Specific/Hardware
> Version: 2.5
> Kernel Version: 2.6.35.4
> Platform: All
> OS/Version: Linux
> Tree: Mainline
> Status: NEW
> Severity: blocking
> Priority: P1
> Component: ARM
> AssignedTo: linux-arm-kernel@lists.arm.linux.org.uk
> ReportedBy: ilya@total-knowledge.com
> Regression: No
>
>
> I am trying to compile the latest kernel, and am running into the following
> error:
> In file included from include/linux/icmpv6.h:173,
> from include/linux/ipv6.h:220,
> from include/net/ipv6.h:16,
> from include/linux/sunrpc/clnt.h:25,
> from include/linux/nfs_fs.h:48,
> from init/do_mounts.c:20:
> include/linux/netdevice.h:1005: error: width of 'reg_state' exceeds its type
> include/linux/netdevice.h:1010: error: width of 'rtnl_link_state' exceeds its
> type
>
>
> There was a change not too long ago, which converted reg_state to a bitfield,
> which apparently doesn't work when -mabi=aapcs.
> I tested it with a gcc versions 4.2.0, 4.4.2, and 4.4.4 and it holds true for
> all of them.
>
> Here is simple test case:
> struct test {
> enum { NETREG_UNINITIALIZED=0,
> } reg_state:16;
> };
>
> int main(int argc, char** argv)
> {
> struct test tt;
> tt.reg_state=NETREG_UNINITIALIZED;
> return 0;
> }
>
> Compiles without -mabi=aapcs option, fails with.
>
Bummer. I guess that this abi requires that enums have `int' width for
some reason?
Does -mabi=aapcs actually get used, officially? All I can see in
Linus's tree is
z:/usr/src/linux-2.6.36-rc5> grep -r aapcs .
./arch/arm/Makefile:CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork
^ permalink raw reply
* Re: [2.6.36-rc5] INET?: possible irq lock inversion dependency
From: Tetsuo Handa @ 2010-09-22 8:58 UTC (permalink / raw)
To: eric.dumazet; +Cc: linux-fsdevel, netdev
In-Reply-To: <1285144681.2639.102.camel@edumazet-laptop>
> Updated and booted/tested patch :
The warning by test.sh disappeared by your patch.
But the warning which I encounter upon reboot still appears.
[ 74.289683] nfsd: last server has exited, flushing export cache
[ 75.935807]
[ 75.935811] =========================================================
[ 75.937431] [ INFO: possible irq lock inversion dependency detected ]
[ 75.937431] 2.6.36-rc5 #2
[ 75.937431] ---------------------------------------------------------
[ 75.937431] kworker/1:1/418 just changed the state of lock:
[ 75.937431] (clock-AF_INET#2){++.?..}, at: [<c135ddee>] xs_tcp_state_change+0x1e/0x1d0
[ 75.937431] but this lock was taken by another, SOFTIRQ-safe lock in the past:
[ 75.937431] (slock-AF_INET){+.-...}
[ 75.937431]
[ 75.937431] and interrupts could create inverse lock ordering between them.
[ 75.937431]
[ 75.937431]
[ 75.937431] other info that might help us debug this:
[ 75.937431] 3 locks held by kworker/1:1/418:
[ 75.937431] #0: (rpciod){+.+.+.}, at: [<c10514d6>] process_one_work+0xd6/0x3a0
[ 75.937431] #1: ((&xprt->task_cleanup)){+.+...}, at: [<c10514d6>] process_one_work+0xd6/0x3a0
[ 75.937431] #2: (sk_lock-AF_INET-RPC){+.+...}, at: [<c1332549>] inet_shutdown+0x49/0x110
[ 75.937431]
[ 75.937431] the shortest dependencies between 2nd lock and 1st lock:
[ 75.937431] -> (slock-AF_INET){+.-...} ops: 1648 {
[ 75.937431] HARDIRQ-ON-W at:
[ 75.937431] [<c106a8de>] mark_irqflags+0xfe/0x180
[ 75.937431] [<c106b65d>] __lock_acquire+0x38d/0x8e0
[ 75.937431] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 75.937431] [<c138be6e>] _raw_spin_lock_bh+0x3e/0x80
[ 75.937431] [<c12daf79>] lock_sock_fast+0x29/0x90
[ 75.937431] [<c132b1e4>] udp_destroy_sock+0x14/0x40
[ 75.937431] [<c12db2d3>] sk_common_release+0xb3/0xc0
[ 75.937431] [<c132bb58>] udp_lib_close+0x8/0x10
[ 75.937431] [<c1331abe>] inet_release+0xbe/0x100
[ 75.937431] [<c12d5476>] sock_release+0x66/0x80
[ 75.937431] [<c12d61f2>] sock_close+0x12/0x30
[ 75.937431] [<c10c637b>] __fput+0x1cb/0x240
[ 75.937431] [<c10c6409>] fput+0x19/0x20
[ 75.937431] [<c10c4263>] filp_close+0x43/0x70
[ 75.937431] [<c103fdcd>] close_files+0xad/0x150
[ 75.937431] [<c103fed9>] put_files_struct+0x29/0xf0
[ 75.937431] [<c1040030>] exit_files+0x40/0x50
[ 75.937431] [<c10406f6>] do_exit+0x116/0x2e0
[ 75.937431] [<c1040924>] do_group_exit+0x34/0xb0
[ 75.937431] [<c10409af>] sys_exit_group+0xf/0x20
[ 75.937431] [<c138c911>] syscall_call+0x7/0xb
[ 75.937431] IN-SOFTIRQ-W at:
[ 75.937431] [<c106a8fe>] mark_irqflags+0x11e/0x180
[ 75.937431] [<c106b65d>] __lock_acquire+0x38d/0x8e0
[ 75.937431] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 75.937431] [<c138bcf9>] _raw_spin_lock+0x39/0x70
[ 75.937431] [<c12d98d1>] sk_clone+0xb1/0x2e0
[ 75.937431] [<c130fdba>] inet_csk_clone+0x1a/0xb0
[ 75.937431] [<c132539c>] tcp_create_openreq_child+0x1c/0x460
[ 75.937431] [<c1322a6f>] tcp_v4_syn_recv_sock+0x3f/0x1e0
[ 75.937431] [<c132596c>] tcp_check_req+0x18c/0x3b0
[ 75.937431] [<c1322c5d>] tcp_v4_hnd_req+0x4d/0x160
[ 75.937431] [<c1322f89>] tcp_v4_do_rcv+0x159/0x280
[ 75.937431] [<c1323624>] tcp_v4_rcv+0x574/0xa30
[ 75.937431] [<c1305483>] ip_local_deliver_finish+0x103/0x320
[ 75.937431] [<c13056d0>] ip_local_deliver+0x30/0x40
[ 75.937431] [<c1305849>] ip_rcv_finish+0x169/0x480
[ 75.937431] [<c1305cfa>] ip_rcv+0x19a/0x2b0
[ 75.937431] [<c12e695d>] __netif_receive_skb+0x21d/0x310
[ 75.937431] [<c12e7468>] process_backlog+0x88/0x160
[ 75.937431] [<c12e7837>] net_rx_action+0x127/0x140
[ 75.937431] [<c1042e70>] __do_softirq+0xd0/0x130
[ 75.937431] INITIAL USE at:
[ 75.937431] [<c106b490>] __lock_acquire+0x1c0/0x8e0
[ 75.937431] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 75.937431] [<c138be6e>] _raw_spin_lock_bh+0x3e/0x80
[ 75.937431] [<c12daf79>] lock_sock_fast+0x29/0x90
[ 75.937431] [<c132b1e4>] udp_destroy_sock+0x14/0x40
[ 75.937431] [<c12db2d3>] sk_common_release+0xb3/0xc0
[ 75.937431] [<c132bb58>] udp_lib_close+0x8/0x10
[ 75.937431] [<c1331abe>] inet_release+0xbe/0x100
[ 75.937431] [<c12d5476>] sock_release+0x66/0x80
[ 75.937431] [<c12d61f2>] sock_close+0x12/0x30
[ 75.937431] [<c10c637b>] __fput+0x1cb/0x240
[ 75.937431] [<c10c6409>] fput+0x19/0x20
[ 75.937431] [<c10c4263>] filp_close+0x43/0x70
[ 75.937431] [<c103fdcd>] close_files+0xad/0x150
[ 75.937431] [<c103fed9>] put_files_struct+0x29/0xf0
[ 75.937431] [<c1040030>] exit_files+0x40/0x50
[ 75.937431] [<c10406f6>] do_exit+0x116/0x2e0
[ 75.937431] [<c1040924>] do_group_exit+0x34/0xb0
[ 75.937431] [<c10409af>] sys_exit_group+0xf/0x20
[ 75.937431] [<c138c911>] syscall_call+0x7/0xb
[ 75.937431] }
[ 75.937431] ... key at: [<c1d4c9d0>] af_family_slock_keys+0x10/0x140
[ 75.937431] ... acquired at:
[ 75.937431] [<c106910b>] check_prevs_add+0xab/0x100
[ 75.937431] [<c1069495>] validate_chain+0x305/0x5a0
[ 75.937431] [<c106b57d>] __lock_acquire+0x2ad/0x8e0
[ 75.937431] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 75.937431] [<c138c4ae>] _raw_write_lock_bh+0x3e/0x80
[ 75.937431] [<c13100e6>] inet_csk_listen_stop+0x86/0x160
[ 75.937431] [<c1312c42>] tcp_close+0x382/0x390
[ 75.937431] [<c1331abe>] inet_release+0xbe/0x100
[ 75.937431] [<c12d5476>] sock_release+0x66/0x80
[ 75.937431] [<c12d61f2>] sock_close+0x12/0x30
[ 75.937431] [<c10c637b>] __fput+0x1cb/0x240
[ 75.937431] [<c10c6409>] fput+0x19/0x20
[ 75.937431] [<c10c4263>] filp_close+0x43/0x70
[ 75.937431] [<c10c42fd>] sys_close+0x6d/0x110
[ 75.937431] [<c138c911>] syscall_call+0x7/0xb
[ 75.937431]
[ 75.937431] -> (clock-AF_INET#2){++.?..} ops: 96 {
[ 75.937431] HARDIRQ-ON-W at:
[ 75.937431] [<c106a8de>] mark_irqflags+0xfe/0x180
[ 75.937431] [<c106b65d>] __lock_acquire+0x38d/0x8e0
[ 75.937431] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 75.937431] [<c138c4ae>] _raw_write_lock_bh+0x3e/0x80
[ 75.937431] [<c135eac3>] xs_tcp_finish_connecting+0x73/0x120
[ 75.937431] [<c135ebcb>] xs_tcp_setup_socket+0x5b/0x180
[ 75.937431] [<c135ee04>] xs_tcp_connect_worker4+0x14/0x20
[ 75.937431] [<c1051547>] process_one_work+0x147/0x3a0
[ 75.937431] [<c1051886>] worker_thread+0xa6/0x200
[ 75.937431] [<c1056765>] kthread+0x75/0x80
[ 75.937431] [<c10031fa>] kernel_thread_helper+0x6/0x1c
[ 75.937431] HARDIRQ-ON-R at:
[ 75.937431] [<c106a84e>] mark_irqflags+0x6e/0x180
[ 75.937431] [<c106b65d>] __lock_acquire+0x38d/0x8e0
[ 75.937431] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 75.937431] [<c138c019>] _raw_read_lock+0x39/0x70
[ 75.937431] [<c135ddee>] xs_tcp_state_change+0x1e/0x1d0
[ 75.937431] [<c131bd78>] tcp_rcv_synsent_state_process+0x398/0x590
[ 75.937431] [<c131c417>] tcp_rcv_state_process+0x4a7/0x560
[ 75.937431] [<c1322ea1>] tcp_v4_do_rcv+0x71/0x280
[ 75.937431] [<c12da226>] __release_sock+0x66/0x150
[ 75.937431] [<c12daf47>] release_sock+0x87/0x90
[ 75.937431] [<c1331eaa>] inet_stream_connect+0x5a/0x1b0
[ 75.937431] [<c12d7d68>] kernel_connect+0x18/0x30
[ 75.937431] [<c135ea9e>] xs_tcp_finish_connecting+0x4e/0x120
[ 75.937431] [<c135ebcb>] xs_tcp_setup_socket+0x5b/0x180
[ 75.937431] [<c135ee04>] xs_tcp_connect_worker4+0x14/0x20
[ 75.937431] [<c1051547>] process_one_work+0x147/0x3a0
[ 75.937431] [<c1051886>] worker_thread+0xa6/0x200
[ 75.937431] [<c1056765>] kthread+0x75/0x80
[ 75.937431] [<c10031fa>] kernel_thread_helper+0x6/0x1c
[ 75.937431] IN-SOFTIRQ-R at:
[ 75.937431] [<c106a8fe>] mark_irqflags+0x11e/0x180
[ 75.937431] [<c106b65d>] __lock_acquire+0x38d/0x8e0
[ 75.937431] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 75.937431] [<c138c019>] _raw_read_lock+0x39/0x70
[ 75.937431] [<c135dcc1>] xs_tcp_data_ready+0x21/0x90
[ 75.937431] [<c131a238>] tcp_data_queue+0x248/0x820
[ 75.937431] [<c131b5ae>] tcp_rcv_established+0xae/0x4e0
[ 75.937431] [<c1323001>] tcp_v4_do_rcv+0x1d1/0x280
[ 75.937431] [<c1323624>] tcp_v4_rcv+0x574/0xa30
[ 75.937431] [<c1305483>] ip_local_deliver_finish+0x103/0x320
[ 75.937431] [<c13056d0>] ip_local_deliver+0x30/0x40
[ 75.937431] [<c1305849>] ip_rcv_finish+0x169/0x480
[ 75.937431] [<c1305cfa>] ip_rcv+0x19a/0x2b0
[ 75.937431] [<c12e695d>] __netif_receive_skb+0x21d/0x310
[ 75.937431] [<c12e7468>] process_backlog+0x88/0x160
[ 75.937431] [<c12e7837>] net_rx_action+0x127/0x140
[ 75.937431] [<c1042e70>] __do_softirq+0xd0/0x130
[ 75.937431] SOFTIRQ-ON-R at:
[ 75.937431] [<c106a8c2>] mark_irqflags+0xe2/0x180
[ 75.937431] [<c106b65d>] __lock_acquire+0x38d/0x8e0
[ 75.937431] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 75.937431] [<c138c019>] _raw_read_lock+0x39/0x70
[ 75.937431] [<c135ddee>] xs_tcp_state_change+0x1e/0x1d0
[ 75.937431] [<c1332597>] inet_shutdown+0x97/0x110
[ 75.937431] [<c12d7f69>] kernel_sock_shutdown+0x9/0x10
[ 75.937431] [<c135d0e7>] xs_tcp_shutdown+0x17/0x20
[ 75.937431] [<c135d3e7>] xs_tcp_close+0x27/0x30
[ 75.937431] [<c135b63d>] xprt_autoclose+0x1d/0x50
[ 75.937431] [<c1051547>] process_one_work+0x147/0x3a0
[ 75.937431] [<c1051886>] worker_thread+0xa6/0x200
[ 75.937431] [<c1056765>] kthread+0x75/0x80
[ 75.937431] [<c10031fa>] kernel_thread_helper+0x6/0x1c
[ 75.937431] INITIAL USE at:
[ 75.937431] [<c106b490>] __lock_acquire+0x1c0/0x8e0
[ 75.937431] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 75.937431] [<c138c4ae>] _raw_write_lock_bh+0x3e/0x80
[ 75.937431] [<c135eac3>] xs_tcp_finish_connecting+0x73/0x120
[ 75.937431] [<c135ebcb>] xs_tcp_setup_socket+0x5b/0x180
[ 75.937431] [<c135ee04>] xs_tcp_connect_worker4+0x14/0x20
[ 75.937431] [<c1051547>] process_one_work+0x147/0x3a0
[ 75.937431] [<c1051886>] worker_thread+0xa6/0x200
[ 75.937431] [<c1056765>] kthread+0x75/0x80
[ 75.937431] [<c10031fa>] kernel_thread_helper+0x6/0x1c
[ 75.937431] }
[ 75.937431] ... key at: [<c1d4cb10>] af_callback_keys+0x10/0x130
[ 75.937431] ... acquired at:
[ 75.937431] [<c1069d46>] check_usage_backwards+0x76/0xd0
[ 75.937431] [<c1069f59>] mark_lock_irq+0x99/0x240
[ 75.937431] [<c106abfc>] mark_lock+0x21c/0x3c0
[ 75.937431] [<c106a8c2>] mark_irqflags+0xe2/0x180
[ 75.937431] [<c106b65d>] __lock_acquire+0x38d/0x8e0
[ 75.937431] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 75.937431] [<c138c019>] _raw_read_lock+0x39/0x70
[ 75.937431] [<c135ddee>] xs_tcp_state_change+0x1e/0x1d0
[ 75.937431] [<c1332597>] inet_shutdown+0x97/0x110
[ 75.937431] [<c12d7f69>] kernel_sock_shutdown+0x9/0x10
[ 75.937431] [<c135d0e7>] xs_tcp_shutdown+0x17/0x20
[ 75.937431] [<c135d3e7>] xs_tcp_close+0x27/0x30
[ 75.937431] [<c135b63d>] xprt_autoclose+0x1d/0x50
[ 75.937431] [<c1051547>] process_one_work+0x147/0x3a0
[ 75.937431] [<c1051886>] worker_thread+0xa6/0x200
[ 75.937431] [<c1056765>] kthread+0x75/0x80
[ 75.937431] [<c10031fa>] kernel_thread_helper+0x6/0x1c
[ 75.937431]
[ 75.937431]
[ 75.937431] stack backtrace:
[ 75.937431] Pid: 418, comm: kworker/1:1 Not tainted 2.6.36-rc5 #2
[ 75.937431] Call Trace:
[ 75.937431] [<c103deb8>] ? printk+0x18/0x20
[ 75.937431] [<c1069bd8>] print_irq_inversion_bug+0x108/0x120
[ 75.937431] [<c1069d46>] check_usage_backwards+0x76/0xd0
[ 75.937431] [<c1069f59>] mark_lock_irq+0x99/0x240
[ 75.937431] [<c1069cd0>] ? check_usage_backwards+0x0/0xd0
[ 75.937431] [<c106abfc>] mark_lock+0x21c/0x3c0
[ 75.937431] [<c106a8c2>] mark_irqflags+0xe2/0x180
[ 75.937431] [<c106b65d>] __lock_acquire+0x38d/0x8e0
[ 75.937431] [<c106c95a>] ? __lock_is_held+0x3a/0x60
[ 75.937431] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 75.937431] [<c135ddee>] ? xs_tcp_state_change+0x1e/0x1d0
[ 75.937431] [<c138c019>] _raw_read_lock+0x39/0x70
[ 75.937431] [<c135ddee>] ? xs_tcp_state_change+0x1e/0x1d0
[ 75.937431] [<c135ddee>] xs_tcp_state_change+0x1e/0x1d0
[ 75.937431] [<c131f2af>] ? tcp_send_fin+0x4f/0xc0
[ 75.937431] [<c1332597>] inet_shutdown+0x97/0x110
[ 75.937431] [<c12d7f69>] kernel_sock_shutdown+0x9/0x10
[ 75.937431] [<c135d0e7>] xs_tcp_shutdown+0x17/0x20
[ 75.937431] [<c135d3e7>] xs_tcp_close+0x27/0x30
[ 75.937431] [<c135b63d>] xprt_autoclose+0x1d/0x50
[ 75.937431] [<c1051547>] process_one_work+0x147/0x3a0
[ 75.937431] [<c10514d6>] ? process_one_work+0xd6/0x3a0
[ 75.937431] [<c106d179>] ? __lock_acquired+0x119/0x1c0
[ 75.937431] [<c135b620>] ? xprt_autoclose+0x0/0x50
[ 75.937431] [<c10517fc>] ? worker_thread+0x1c/0x200
[ 75.937431] [<c1050317>] ? __need_more_worker+0x17/0x40
[ 75.937431] [<c1051886>] worker_thread+0xa6/0x200
[ 75.937431] [<c1056765>] kthread+0x75/0x80
[ 75.937431] [<c10517e0>] ? worker_thread+0x0/0x200
[ 75.937431] [<c10566f0>] ? kthread+0x0/0x80
[ 75.937431] [<c10031fa>] kernel_thread_helper+0x6/0x1c
[ 83.749463] Restarting system.
[ 83.751581] machine restart
FYI,
# cat /etc/exports
/usr/src/ *(rw,no_root_squash,async)
# grep nfs /proc/mounts
127.0.0.1:/usr/src/ /mnt nfs rw,relatime,vers=3,rsize=32768,wsize=32768,namlen=255,hard,proto=udp,port=65535,timeo=7,retrans=3,sec=sys,addr=127.0.0.1 0 0
test.sh does not trigger this warning on 2.6.34.7 and
triggers this warning on 2.6.35.5 .
Regards.
^ permalink raw reply
* Re: [2.6.36-rc5] INET?: possible irq lock inversion dependency
From: Eric Dumazet @ 2010-09-22 8:38 UTC (permalink / raw)
To: Tetsuo Handa; +Cc: linux-fsdevel, netdev
In-Reply-To: <1285144471.2639.96.camel@edumazet-laptop>
Le mercredi 22 septembre 2010 à 10:34 +0200, Eric Dumazet a écrit :
> small bug in my patch , please delete the orphan line :
>
> > af_callback_keys + sk->sk_family,
>
>
> > af_family_clock_key_strings[sk->sk_family]);
> >
>
Updated and booted/tested patch :
include/net/sock.h | 1 +
net/core/sock.c | 8 ++++++--
net/ipv4/udp.c | 3 +++
net/ipv4/udplite.c | 3 +++
net/ipv6/udp.c | 3 +++
net/ipv6/udplite.c | 3 +++
6 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/include/net/sock.h b/include/net/sock.h
index adab9dc..c5104bc 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -800,6 +800,7 @@ struct proto {
#ifdef SOCK_REFCNT_DEBUG
atomic_t socks;
#endif
+ struct lock_class_key *callback_key;
};
extern int proto_register(struct proto *prot, int alloc_slab);
diff --git a/net/core/sock.c b/net/core/sock.c
index b05b9b6..79ef50a 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1210,7 +1210,9 @@ struct sock *sk_clone(const struct sock *sk, const gfp_t priority)
spin_lock_init(&newsk->sk_dst_lock);
rwlock_init(&newsk->sk_callback_lock);
lockdep_set_class_and_name(&newsk->sk_callback_lock,
- af_callback_keys + newsk->sk_family,
+ sk->sk_prot->callback_key ?
+ sk->sk_prot->callback_key :
+ af_callback_keys + newsk->sk_family,
af_family_clock_key_strings[newsk->sk_family]);
newsk->sk_dst_cache = NULL;
@@ -1965,7 +1967,9 @@ void sock_init_data(struct socket *sock, struct sock *sk)
spin_lock_init(&sk->sk_dst_lock);
rwlock_init(&sk->sk_callback_lock);
lockdep_set_class_and_name(&sk->sk_callback_lock,
- af_callback_keys + sk->sk_family,
+ sk->sk_prot->callback_key ?
+ sk->sk_prot->callback_key :
+ af_callback_keys + sk->sk_family,
af_family_clock_key_strings[sk->sk_family]);
sk->sk_state_change = sock_def_wakeup;
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index fb23c2e..c0877b6 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1870,6 +1870,8 @@ unsigned int udp_poll(struct file *file, struct socket *sock, poll_table *wait)
}
EXPORT_SYMBOL(udp_poll);
+static struct lock_class_key udp_callback_key;
+
struct proto udp_prot = {
.name = "UDP",
.owner = THIS_MODULE,
@@ -1899,6 +1901,7 @@ struct proto udp_prot = {
.compat_setsockopt = compat_udp_setsockopt,
.compat_getsockopt = compat_udp_getsockopt,
#endif
+ .callback_key = &udp_callback_key,
};
EXPORT_SYMBOL(udp_prot);
diff --git a/net/ipv4/udplite.c b/net/ipv4/udplite.c
index ab76aa9..51b159d 100644
--- a/net/ipv4/udplite.c
+++ b/net/ipv4/udplite.c
@@ -32,6 +32,8 @@ static const struct net_protocol udplite_protocol = {
.netns_ok = 1,
};
+static struct lock_class_key udplite_callback_key;
+
struct proto udplite_prot = {
.name = "UDP-Lite",
.owner = THIS_MODULE,
@@ -57,6 +59,7 @@ struct proto udplite_prot = {
.compat_setsockopt = compat_udp_setsockopt,
.compat_getsockopt = compat_udp_getsockopt,
#endif
+ .callback_key = &udplite_callback_key,
};
EXPORT_SYMBOL(udplite_prot);
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 5acb356..0777934 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -1441,6 +1441,8 @@ void udp6_proc_exit(struct net *net) {
/* ------------------------------------------------------------------------ */
+static struct lock_class_key udp6_callback_key;
+
struct proto udpv6_prot = {
.name = "UDPv6",
.owner = THIS_MODULE,
@@ -1469,6 +1471,7 @@ struct proto udpv6_prot = {
.compat_setsockopt = compat_udpv6_setsockopt,
.compat_getsockopt = compat_udpv6_getsockopt,
#endif
+ .callback_key = &udp6_callback_key,
};
static struct inet_protosw udpv6_protosw = {
diff --git a/net/ipv6/udplite.c b/net/ipv6/udplite.c
index 5f48fad..7bbb627 100644
--- a/net/ipv6/udplite.c
+++ b/net/ipv6/udplite.c
@@ -31,6 +31,8 @@ static const struct inet6_protocol udplitev6_protocol = {
.flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,
};
+static struct lock_class_key udp6lite_callback_key;
+
struct proto udplitev6_prot = {
.name = "UDPLITEv6",
.owner = THIS_MODULE,
@@ -55,6 +57,7 @@ struct proto udplitev6_prot = {
.compat_setsockopt = compat_udpv6_setsockopt,
.compat_getsockopt = compat_udpv6_getsockopt,
#endif
+ .callback_key = &udp6lite_callback_key,
};
static struct inet_protosw udplite6_protosw = {
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* Re: [2.6.36-rc5] INET?: possible irq lock inversion dependency
From: Eric Dumazet @ 2010-09-22 8:34 UTC (permalink / raw)
To: Tetsuo Handa; +Cc: linux-fsdevel, netdev
In-Reply-To: <1285144306.2639.90.camel@edumazet-laptop>
Le mercredi 22 septembre 2010 à 10:31 +0200, Eric Dumazet a écrit :
> diff --git a/net/core/sock.c b/net/core/sock.c
> index b05b9b6..afd0f69 100644
> --- a/net/core/sock.c
> +++ b/net/core/sock.c
> @@ -1210,7 +1210,9 @@ struct sock *sk_clone(const struct sock *sk, const gfp_t priority)
> spin_lock_init(&newsk->sk_dst_lock);
> rwlock_init(&newsk->sk_callback_lock);
> lockdep_set_class_and_name(&newsk->sk_callback_lock,
> - af_callback_keys + newsk->sk_family,
> + sk->sk_prot->callback_key ?
> + sk->sk_prot->callback_key :
> + af_callback_keys + newsk->sk_family,
> af_family_clock_key_strings[newsk->sk_family]);
>
> newsk->sk_dst_cache = NULL;
> @@ -1965,6 +1967,9 @@ void sock_init_data(struct socket *sock, struct sock *sk)
> spin_lock_init(&sk->sk_dst_lock);
> rwlock_init(&sk->sk_callback_lock);
> lockdep_set_class_and_name(&sk->sk_callback_lock,
> + sk->sk_prot->callback_key ?
> + sk->sk_prot->callback_key :
> + af_callback_keys + newsk->sk_family,
small bug in my patch , please delete the orphan line :
> af_callback_keys + sk->sk_family,
> af_family_clock_key_strings[sk->sk_family]);
>
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [2.6.36-rc5] INET?: possible irq lock inversion dependency
From: Eric Dumazet @ 2010-09-22 8:31 UTC (permalink / raw)
To: Tetsuo Handa; +Cc: linux-fsdevel, netdev
In-Reply-To: <201009220714.o8M7Ebps067361@www262.sakura.ne.jp>
Le mercredi 22 septembre 2010 à 16:14 +0900, Tetsuo Handa a écrit :
> I established steps to reproduce this warning using clean 2.6.36-rc5 .
>
> [ 37.539697] =========================================================
> [ 37.541991] [ INFO: possible irq lock inversion dependency detected ]
> [ 37.541991] 2.6.36-rc5 #1
> [ 37.541991] ---------------------------------------------------------
> [ 37.541991] mount/2681 just changed the state of lock:
> [ 37.541991] (clock-AF_INET){++.?..}, at: [<c135e03c>] xs_udp_write_space+0x1c/0x50
> [ 37.541991] but this lock was taken by another, SOFTIRQ-safe lock in the past:
> [ 37.541991] (slock-AF_INET){+.-...}
> [ 37.541991]
> [ 37.541991] and interrupts could create inverse lock ordering between them.
> [ 37.541991]
> [ 37.541991]
> [ 37.541991] other info that might help us debug this:
> [ 37.541991] no locks held by mount/2681.
> [ 37.541991]
> [ 37.541991] the shortest dependencies between 2nd lock and 1st lock:
> [ 37.541991] -> (slock-AF_INET){+.-...} ops: 562 {
> [ 37.541991] HARDIRQ-ON-W at:
> [ 37.541991] [<c106a8de>] mark_irqflags+0xfe/0x180
> [ 37.541991] [<c106b65d>] __lock_acquire+0x38d/0x8e0
> [ 37.541991] [<c106cbfa>] lock_acquire+0x7a/0xa0
> [ 37.541991] [<c138be2e>] _raw_spin_lock_bh+0x3e/0x80
> [ 37.541991] [<c12daf39>] lock_sock_fast+0x29/0x90
> [ 37.541991] [<c132b1a4>] udp_destroy_sock+0x14/0x40
> [ 37.541991] [<c12db293>] sk_common_release+0xb3/0xc0
> [ 37.541991] [<c132bb18>] udp_lib_close+0x8/0x10
> [ 37.541991] [<c1331a7e>] inet_release+0xbe/0x100
> [ 37.541991] [<c12d5476>] sock_release+0x66/0x80
> [ 37.541991] [<c12d61f2>] sock_close+0x12/0x30
> [ 37.541991] [<c10c637b>] __fput+0x1cb/0x240
> [ 37.541991] [<c10c6409>] fput+0x19/0x20
> [ 37.541991] [<c10c4263>] filp_close+0x43/0x70
> [ 37.541991] [<c103fdcd>] close_files+0xad/0x150
> [ 37.541991] [<c103fed9>] put_files_struct+0x29/0xf0
> [ 37.541991] [<c1040030>] exit_files+0x40/0x50
> [ 37.541991] [<c10406f6>] do_exit+0x116/0x2e0
> [ 37.541991] [<c1040924>] do_group_exit+0x34/0xb0
> [ 37.541991] [<c10409af>] sys_exit_group+0xf/0x20
> [ 37.541991] [<c138c8d1>] syscall_call+0x7/0xb
> [ 37.541991] IN-SOFTIRQ-W at:
> [ 37.541991] [<c106a8fe>] mark_irqflags+0x11e/0x180
> [ 37.541991] [<c106b65d>] __lock_acquire+0x38d/0x8e0
> [ 37.541991] [<c106cbfa>] lock_acquire+0x7a/0xa0
> [ 37.541991] [<c138bcb9>] _raw_spin_lock+0x39/0x70
> [ 37.541991] [<c12d98d1>] sk_clone+0xb1/0x2c0
> [ 37.541991] [<c130fd7a>] inet_csk_clone+0x1a/0xb0
> [ 37.541991] [<c132535c>] tcp_create_openreq_child+0x1c/0x460
> [ 37.541991] [<c1322a2f>] tcp_v4_syn_recv_sock+0x3f/0x1e0
> [ 37.940862] [<c132592c>] tcp_check_req+0x18c/0x3b0
> [ 37.940862] [<c1322c1d>] tcp_v4_hnd_req+0x4d/0x160
> [ 37.940862] [<c1322f49>] tcp_v4_do_rcv+0x159/0x280
> [ 37.940862] [<c13235e4>] tcp_v4_rcv+0x574/0xa30
> [ 37.940862] [<c1305443>] ip_local_deliver_finish+0x103/0x320
> [ 37.940862] [<c1305690>] ip_local_deliver+0x30/0x40
> [ 37.940862] [<c1305809>] ip_rcv_finish+0x169/0x480
> [ 37.940862] [<c1305cba>] ip_rcv+0x19a/0x2b0
> [ 37.940862] [<c12e691d>] __netif_receive_skb+0x21d/0x310
> [ 37.940862] [<c12e7428>] process_backlog+0x88/0x160
> [ 37.940862] [<c12e77f7>] net_rx_action+0x127/0x140
> [ 37.940862] [<c1042e70>] __do_softirq+0xd0/0x130
> [ 37.940862] INITIAL USE at:
> [ 37.940862] [<c106b490>] __lock_acquire+0x1c0/0x8e0
> [ 37.940862] [<c106cbfa>] lock_acquire+0x7a/0xa0
> [ 37.940862] [<c138be2e>] _raw_spin_lock_bh+0x3e/0x80
> [ 37.940862] [<c12daf39>] lock_sock_fast+0x29/0x90
> [ 37.940862] [<c132b1a4>] udp_destroy_sock+0x14/0x40
> [ 37.940862] [<c12db293>] sk_common_release+0xb3/0xc0
> [ 37.940862] [<c132bb18>] udp_lib_close+0x8/0x10
> [ 37.940862] [<c1331a7e>] inet_release+0xbe/0x100
> [ 37.940862] [<c12d5476>] sock_release+0x66/0x80
> [ 37.940862] [<c12d61f2>] sock_close+0x12/0x30
> [ 37.940862] [<c10c637b>] __fput+0x1cb/0x240
> [ 37.940862] [<c10c6409>] fput+0x19/0x20
> [ 37.940862] [<c10c4263>] filp_close+0x43/0x70
> [ 37.940862] [<c103fdcd>] close_files+0xad/0x150
> [ 37.940862] [<c103fed9>] put_files_struct+0x29/0xf0
> [ 37.940862] [<c1040030>] exit_files+0x40/0x50
> [ 37.940862] [<c10406f6>] do_exit+0x116/0x2e0
> [ 37.940862] [<c1040924>] do_group_exit+0x34/0xb0
> [ 37.940862] [<c10409af>] sys_exit_group+0xf/0x20
> [ 37.940862] [<c138c8d1>] syscall_call+0x7/0xb
> [ 37.940862] }
> [ 37.940862] ... key at: [<c1d4c9d0>] af_family_slock_keys+0x10/0x140
> [ 37.940862] ... acquired at:
> [ 37.940862] [<c106910b>] check_prevs_add+0xab/0x100
> [ 37.940862] [<c1069495>] validate_chain+0x305/0x5a0
> [ 37.940862] [<c106b57d>] __lock_acquire+0x2ad/0x8e0
> [ 37.940862] [<c106cbfa>] lock_acquire+0x7a/0xa0
> [ 37.940862] [<c138c46e>] _raw_write_lock_bh+0x3e/0x80
> [ 37.940862] [<c13100a6>] inet_csk_listen_stop+0x86/0x160
> [ 37.940862] [<c1312c02>] tcp_close+0x382/0x390
> [ 37.940862] [<c1331a7e>] inet_release+0xbe/0x100
> [ 37.940862] [<c12d5476>] sock_release+0x66/0x80
> [ 37.940862] [<c12d61f2>] sock_close+0x12/0x30
> [ 37.940862] [<c10c637b>] __fput+0x1cb/0x240
> [ 37.940862] [<c10c6409>] fput+0x19/0x20
> [ 37.940862] [<c10c4263>] filp_close+0x43/0x70
> [ 37.940862] [<c10c42fd>] sys_close+0x6d/0x110
> [ 37.940862] [<c138c8d1>] syscall_call+0x7/0xb
> [ 37.940862]
> [ 37.940862] -> (clock-AF_INET){++.?..} ops: 72 {
> [ 37.940862] HARDIRQ-ON-W at:
> [ 37.940862] [<c106a8de>] mark_irqflags+0xfe/0x180
> [ 37.940862] [<c106b65d>] __lock_acquire+0x38d/0x8e0
> [ 37.940862] [<c106cbfa>] lock_acquire+0x7a/0xa0
> [ 37.940862] [<c138c46e>] _raw_write_lock_bh+0x3e/0x80
> [ 37.940862] [<c12db20f>] sk_common_release+0x2f/0xc0
> [ 37.940862] [<c132bb18>] udp_lib_close+0x8/0x10
> [ 37.940862] [<c1331a7e>] inet_release+0xbe/0x100
> [ 37.940862] [<c12d5476>] sock_release+0x66/0x80
> [ 37.940862] [<c12d61f2>] sock_close+0x12/0x30
> [ 37.940862] [<c10c637b>] __fput+0x1cb/0x240
> [ 37.940862] [<c10c6409>] fput+0x19/0x20
> [ 37.940862] [<c10c4263>] filp_close+0x43/0x70
> [ 37.940862] [<c103fdcd>] close_files+0xad/0x150
> [ 37.940862] [<c103fed9>] put_files_struct+0x29/0xf0
> [ 37.940862] [<c1040030>] exit_files+0x40/0x50
> [ 37.940862] [<c10406f6>] do_exit+0x116/0x2e0
> [ 37.940862] [<c1040924>] do_group_exit+0x34/0xb0
> [ 37.940862] [<c10409af>] sys_exit_group+0xf/0x20
> [ 37.940862] [<c138c8d1>] syscall_call+0x7/0xb
> [ 37.940862] HARDIRQ-ON-R at:
> [ 37.940862] [<c106a84e>] mark_irqflags+0x6e/0x180
> [ 37.940862] [<c106b65d>] __lock_acquire+0x38d/0x8e0
> [ 37.940862] [<c106cbfa>] lock_acquire+0x7a/0xa0
> [ 37.940862] [<c138bfd9>] _raw_read_lock+0x39/0x70
> [ 37.940862] [<c135ddae>] xs_tcp_state_change+0x1e/0x1d0
> [ 37.940862] [<c131bd38>] tcp_rcv_synsent_state_process+0x398/0x590
> [ 37.940862] [<c131c3d7>] tcp_rcv_state_process+0x4a7/0x560
> [ 37.940862] [<c1322e61>] tcp_v4_do_rcv+0x71/0x280
> [ 37.940862] [<c12da206>] __release_sock+0x66/0x150
> [ 37.940862] [<c12daf07>] release_sock+0x87/0x90
> [ 37.940862] [<c1331e6a>] inet_stream_connect+0x5a/0x1b0
> [ 37.940862] [<c12d7d68>] kernel_connect+0x18/0x30
> [ 37.940862] [<c135ea5e>] xs_tcp_finish_connecting+0x4e/0x120
> [ 37.940862] [<c135eb8b>] xs_tcp_setup_socket+0x5b/0x180
> [ 37.940862] [<c135edc4>] xs_tcp_connect_worker4+0x14/0x20
> [ 37.940862] [<c1051547>] process_one_work+0x147/0x3a0
> [ 37.940862] [<c1051886>] worker_thread+0xa6/0x200
> [ 37.940862] [<c1056765>] kthread+0x75/0x80
> [ 37.940862] [<c10031fa>] kernel_thread_helper+0x6/0x1c
> [ 37.940862] IN-SOFTIRQ-R at:
> [ 37.940862] [<c106a8fe>] mark_irqflags+0x11e/0x180
> [ 37.940862] [<c106b65d>] __lock_acquire+0x38d/0x8e0
> [ 37.940862] [<c106cbfa>] lock_acquire+0x7a/0xa0
> [ 37.940862] [<c138bfd9>] _raw_read_lock+0x39/0x70
> [ 37.940862] [<c135dc81>] xs_tcp_data_ready+0x21/0x90
> [ 37.940862] [<c131a1f8>] tcp_data_queue+0x248/0x820
> [ 37.940862] [<c131b56e>] tcp_rcv_established+0xae/0x4e0
> [ 37.940862] [<c1322fc1>] tcp_v4_do_rcv+0x1d1/0x280
> [ 37.940862] [<c13235e4>] tcp_v4_rcv+0x574/0xa30
> [ 37.940862] [<c1305443>] ip_local_deliver_finish+0x103/0x320
> [ 37.940862] [<c1305690>] ip_local_deliver+0x30/0x40
> [ 37.940862] [<c1305809>] ip_rcv_finish+0x169/0x480
> [ 37.940862] [<c1305cba>] ip_rcv+0x19a/0x2b0
> [ 37.940862] [<c12e691d>] __netif_receive_skb+0x21d/0x310
> [ 37.940862] [<c12e7428>] process_backlog+0x88/0x160
> [ 37.940862] [<c12e77f7>] net_rx_action+0x127/0x140
> [ 37.940862] [<c1042e70>] __do_softirq+0xd0/0x130
> [ 37.940862] SOFTIRQ-ON-R at:
> [ 37.940862] [<c106a8c2>] mark_irqflags+0xe2/0x180
> [ 37.940862] [<c106b65d>] __lock_acquire+0x38d/0x8e0
> [ 37.940862] [<c106cbfa>] lock_acquire+0x7a/0xa0
> [ 37.940862] [<c138bfd9>] _raw_read_lock+0x39/0x70
> [ 37.940862] [<c135e03c>] xs_udp_write_space+0x1c/0x50
> [ 37.940862] [<c135e14a>] xs_udp_do_set_buffer_size+0x8a/0x90
> [ 37.940862] [<c135e18d>] xs_udp_set_buffer_size+0x3d/0x40
> [ 37.940862] [<c13594d8>] rpc_setbufsize+0x28/0x30
> [ 37.940862] [<e0967314>] nfs_server_set_fsinfo+0x364/0x400 [nfs]
> [ 37.940862] [<e0967415>] nfs_probe_fsinfo+0x65/0x100 [nfs]
> [ 37.940862] [<e0967717>] nfs_create_server+0x87/0x240 [nfs]
> [ 37.940862] [<e0971aeb>] nfs_get_sb+0x8b/0x240 [nfs]
> [ 37.940862] [<c10c7f41>] vfs_kern_mount+0x71/0x190
> [ 37.940862] [<c10c8287>] do_kern_mount+0x37/0x90
> [ 37.940862] [<c10de6c7>] do_new_mount+0x57/0xa0
> [ 37.940862] [<c10decc1>] do_mount+0x171/0x1b0
> [ 37.940862] [<c10defbc>] sys_mount+0x6c/0xa0
> [ 37.940862] [<c138c8d1>] syscall_call+0x7/0xb
> [ 37.940862] INITIAL USE at:
> [ 37.940862] [<c106b490>] __lock_acquire+0x1c0/0x8e0
> [ 37.940862] [<c106cbfa>] lock_acquire+0x7a/0xa0
> [ 37.940862] [<c138c46e>] _raw_write_lock_bh+0x3e/0x80
> [ 37.940862] [<c12db20f>] sk_common_release+0x2f/0xc0
> [ 37.940862] [<c132bb18>] udp_lib_close+0x8/0x10
> [ 37.940862] [<c1331a7e>] inet_release+0xbe/0x100
> [ 37.940862] [<c12d5476>] sock_release+0x66/0x80
> [ 37.940862] [<c12d61f2>] sock_close+0x12/0x30
> [ 37.940862] [<c10c637b>] __fput+0x1cb/0x240
> [ 37.940862] [<c10c6409>] fput+0x19/0x20
> [ 37.940862] [<c10c4263>] filp_close+0x43/0x70
> [ 37.940862] [<c103fdcd>] close_files+0xad/0x150
> [ 37.940862] [<c103fed9>] put_files_struct+0x29/0xf0
> [ 37.940862] [<c1040030>] exit_files+0x40/0x50
> [ 37.940862] [<c10406f6>] do_exit+0x116/0x2e0
> [ 37.940862] [<c1040924>] do_group_exit+0x34/0xb0
> [ 37.940862] [<c10409af>] sys_exit_group+0xf/0x20
> [ 37.940862] [<c138c8d1>] syscall_call+0x7/0xb
> [ 37.940862] }
> [ 37.940862] ... key at: [<c1d4cb10>] af_callback_keys+0x10/0x130
> [ 37.940862] ... acquired at:
> [ 37.940862] [<c1069d46>] check_usage_backwards+0x76/0xd0
> [ 37.940862] [<c1069f59>] mark_lock_irq+0x99/0x240
> [ 37.940862] [<c106abfc>] mark_lock+0x21c/0x3c0
> [ 37.940862] [<c106a8c2>] mark_irqflags+0xe2/0x180
> [ 37.940862] [<c106b65d>] __lock_acquire+0x38d/0x8e0
> [ 37.940862] [<c106cbfa>] lock_acquire+0x7a/0xa0
> [ 37.940862] [<c138bfd9>] _raw_read_lock+0x39/0x70
> [ 37.940862] [<c135e03c>] xs_udp_write_space+0x1c/0x50
> [ 37.940862] [<c135e14a>] xs_udp_do_set_buffer_size+0x8a/0x90
> [ 37.940862] [<c135e18d>] xs_udp_set_buffer_size+0x3d/0x40
> [ 37.940862] [<c13594d8>] rpc_setbufsize+0x28/0x30
> [ 37.940862] [<e0967314>] nfs_server_set_fsinfo+0x364/0x400 [nfs]
> [ 37.940862] [<e0967415>] nfs_probe_fsinfo+0x65/0x100 [nfs]
> [ 37.940862] [<e0967717>] nfs_create_server+0x87/0x240 [nfs]
> [ 37.940862] [<e0971aeb>] nfs_get_sb+0x8b/0x240 [nfs]
> [ 37.940862] [<c10c7f41>] vfs_kern_mount+0x71/0x190
> [ 37.940862] [<c10c8287>] do_kern_mount+0x37/0x90
> [ 37.940862] [<c10de6c7>] do_new_mount+0x57/0xa0
> [ 37.940862] [<c10decc1>] do_mount+0x171/0x1b0
> [ 37.940862] [<c10defbc>] sys_mount+0x6c/0xa0
> [ 37.940862] [<c138c8d1>] syscall_call+0x7/0xb
> [ 37.940862]
> [ 37.940862]
> [ 37.940862] stack backtrace:
> [ 37.940862] Pid: 2681, comm: mount Not tainted 2.6.36-rc5 #1
> [ 37.940862] Call Trace:
> [ 37.940862] [<c103deb8>] ? printk+0x18/0x20
> [ 37.940862] [<c1069bd8>] print_irq_inversion_bug+0x108/0x120
> [ 37.940862] [<c1069d46>] check_usage_backwards+0x76/0xd0
> [ 37.940862] [<c1069f59>] mark_lock_irq+0x99/0x240
> [ 37.940862] [<c1069cd0>] ? check_usage_backwards+0x0/0xd0
> [ 37.940862] [<c106abfc>] mark_lock+0x21c/0x3c0
> [ 37.940862] [<c106a8c2>] mark_irqflags+0xe2/0x180
> [ 37.940862] [<c106b65d>] __lock_acquire+0x38d/0x8e0
> [ 37.940862] [<c109a5fe>] ? mempool_free_slab+0xe/0x10
> [ 37.940862] [<c109a5d8>] ? mempool_free+0x98/0xa0
> [ 37.940862] [<c106cbfa>] lock_acquire+0x7a/0xa0
> [ 37.940862] [<c135e03c>] ? xs_udp_write_space+0x1c/0x50
> [ 37.940862] [<c138bfd9>] _raw_read_lock+0x39/0x70
> [ 37.940862] [<c135e03c>] ? xs_udp_write_space+0x1c/0x50
> [ 37.940862] [<c135e03c>] xs_udp_write_space+0x1c/0x50
> [ 37.940862] [<c135e14a>] xs_udp_do_set_buffer_size+0x8a/0x90
> [ 37.940862] [<c135e18d>] xs_udp_set_buffer_size+0x3d/0x40
> [ 37.940862] [<c135e150>] ? xs_udp_set_buffer_size+0x0/0x40
> [ 37.940862] [<c13594d8>] rpc_setbufsize+0x28/0x30
> [ 37.940862] [<e0967314>] nfs_server_set_fsinfo+0x364/0x400 [nfs]
> [ 37.940862] [<e0967415>] nfs_probe_fsinfo+0x65/0x100 [nfs]
> [ 37.940862] [<c10bf558>] ? cache_alloc_debugcheck_after+0x98/0x1d0
> [ 37.940862] [<e096e1d3>] ? nfs_alloc_fattr+0x23/0x30 [nfs]
> [ 37.940862] [<e0967717>] nfs_create_server+0x87/0x240 [nfs]
> [ 37.940862] [<e096e1f5>] ? nfs_alloc_fhandle+0x15/0x30 [nfs]
> [ 37.940862] [<e0971aeb>] nfs_get_sb+0x8b/0x240 [nfs]
> [ 37.940862] [<e09719b0>] ? nfs_compare_super+0x0/0x90 [nfs]
> [ 37.940862] [<c10c7f41>] vfs_kern_mount+0x71/0x190
> [ 37.940862] [<c10dc11c>] ? get_fs_type+0x8c/0xa0
> [ 37.940862] [<c10c8287>] do_kern_mount+0x37/0x90
> [ 37.940862] [<c10de6c7>] do_new_mount+0x57/0xa0
> [ 37.940862] [<c10decc1>] do_mount+0x171/0x1b0
> [ 37.940862] [<c10defbc>] sys_mount+0x6c/0xa0
> [ 37.940862] [<c138c8d1>] syscall_call+0x7/0xb
>
> Boot and login and run test.sh below
>
> --- test.sh start ---
> #! /bin/sh
> ./a.out
> echo 1 > /proc/sys/kernel/printk_delay
> mount 127.0.0.1:/usr/src/ /mnt/
> umount /mnt/
> --- test.sh end ---
>
> where a.out is made by "gcc -Wall -O3 test.c"
>
> --- test.c start ---
> #include <stdlib.h>
> #include <unistd.h>
> #include <sys/types.h>
> #include <sys/socket.h>
> #include <arpa/inet.h>
>
> int main(int argc, char *argv[])
> {
> int fd1 = socket(AF_INET, SOCK_STREAM, 0);
> int fd2 = socket(AF_INET, SOCK_STREAM, 0);
> struct sockaddr_in addr = { };
> socklen_t size = sizeof(addr);
> addr.sin_family = AF_INET;
> addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
> addr.sin_port = htons(0);
> bind(fd1, (struct sockaddr *) &addr, sizeof(addr));
> listen(fd1, 5);
> getsockname(fd1, (struct sockaddr *) &addr, &size);
> connect(fd2, (struct sockaddr *) &addr, sizeof(addr));
> close(fd1);
> close(fd2);
> return 0;
> }
> --- test.c end ---
>
> Config is at http://I-love.SAKURA.ne.jp/tmp/config-2.6.36-rc5
> Full log is at http://I-love.SAKURA.ne.jp/tmp/dmesg-2.6.36-rc5.txt
>
> I'm using Debian Sarge on i686.
>
> Regards.
Thanks
no splat here using your script/program
And I dont really understand why a mixed udp & tcp workload could
trigger a lockdep splat.
Ah, all sockets of a same family (AF_INET in your case) share a single
af_callback_keys :
commit da21f24dd7395 said so.
Problem is about sk_callback_lock, not the lock_sock_fast()
I wonder if we dont need to use a separate "struct lock_class_key" per
protocol (stored in struct proto) ...
Could you try following interim patch ?
Thanks
diff --git a/include/net/sock.h b/include/net/sock.h
index adab9dc..c5104bc 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -800,6 +800,7 @@ struct proto {
#ifdef SOCK_REFCNT_DEBUG
atomic_t socks;
#endif
+ struct lock_class_key *callback_key;
};
extern int proto_register(struct proto *prot, int alloc_slab);
diff --git a/net/core/sock.c b/net/core/sock.c
index b05b9b6..afd0f69 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1210,7 +1210,9 @@ struct sock *sk_clone(const struct sock *sk, const gfp_t priority)
spin_lock_init(&newsk->sk_dst_lock);
rwlock_init(&newsk->sk_callback_lock);
lockdep_set_class_and_name(&newsk->sk_callback_lock,
- af_callback_keys + newsk->sk_family,
+ sk->sk_prot->callback_key ?
+ sk->sk_prot->callback_key :
+ af_callback_keys + newsk->sk_family,
af_family_clock_key_strings[newsk->sk_family]);
newsk->sk_dst_cache = NULL;
@@ -1965,6 +1967,9 @@ void sock_init_data(struct socket *sock, struct sock *sk)
spin_lock_init(&sk->sk_dst_lock);
rwlock_init(&sk->sk_callback_lock);
lockdep_set_class_and_name(&sk->sk_callback_lock,
+ sk->sk_prot->callback_key ?
+ sk->sk_prot->callback_key :
+ af_callback_keys + newsk->sk_family,
af_callback_keys + sk->sk_family,
af_family_clock_key_strings[sk->sk_family]);
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index fb23c2e..c0877b6 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1870,6 +1870,8 @@ unsigned int udp_poll(struct file *file, struct socket *sock, poll_table *wait)
}
EXPORT_SYMBOL(udp_poll);
+static struct lock_class_key udp_callback_key;
+
struct proto udp_prot = {
.name = "UDP",
.owner = THIS_MODULE,
@@ -1899,6 +1901,7 @@ struct proto udp_prot = {
.compat_setsockopt = compat_udp_setsockopt,
.compat_getsockopt = compat_udp_getsockopt,
#endif
+ .callback_key = &udp_callback_key,
};
EXPORT_SYMBOL(udp_prot);
diff --git a/net/ipv4/udplite.c b/net/ipv4/udplite.c
index ab76aa9..51b159d 100644
--- a/net/ipv4/udplite.c
+++ b/net/ipv4/udplite.c
@@ -32,6 +32,8 @@ static const struct net_protocol udplite_protocol = {
.netns_ok = 1,
};
+static struct lock_class_key udplite_callback_key;
+
struct proto udplite_prot = {
.name = "UDP-Lite",
.owner = THIS_MODULE,
@@ -57,6 +59,7 @@ struct proto udplite_prot = {
.compat_setsockopt = compat_udp_setsockopt,
.compat_getsockopt = compat_udp_getsockopt,
#endif
+ .callback_key = &udplite_callback_key,
};
EXPORT_SYMBOL(udplite_prot);
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 5acb356..0777934 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -1441,6 +1441,8 @@ void udp6_proc_exit(struct net *net) {
/* ------------------------------------------------------------------------ */
+static struct lock_class_key udp6_callback_key;
+
struct proto udpv6_prot = {
.name = "UDPv6",
.owner = THIS_MODULE,
@@ -1469,6 +1471,7 @@ struct proto udpv6_prot = {
.compat_setsockopt = compat_udpv6_setsockopt,
.compat_getsockopt = compat_udpv6_getsockopt,
#endif
+ .callback_key = &udp6_callback_key,
};
static struct inet_protosw udpv6_protosw = {
diff --git a/net/ipv6/udplite.c b/net/ipv6/udplite.c
index 5f48fad..7bbb627 100644
--- a/net/ipv6/udplite.c
+++ b/net/ipv6/udplite.c
@@ -31,6 +31,8 @@ static const struct inet6_protocol udplitev6_protocol = {
.flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,
};
+static struct lock_class_key udp6lite_callback_key;
+
struct proto udplitev6_prot = {
.name = "UDPLITEv6",
.owner = THIS_MODULE,
@@ -55,6 +57,7 @@ struct proto udplitev6_prot = {
.compat_setsockopt = compat_udpv6_setsockopt,
.compat_getsockopt = compat_udpv6_getsockopt,
#endif
+ .callback_key = &udp6lite_callback_key,
};
static struct inet_protosw udplite6_protosw = {
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* software iwarp stack update
From: Bernard Metzler @ 2010-09-22 8:19 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: netdev-u79uwXL29TY76Z2rM5mHXA
Earlier this year, we announced the availability of an open source,
full software implementation of the iWARP RDMA protocol stack - see
my email "software iwarp stack" from March 14th at the linux-rdma list
(http://www.mail-archive.com/linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org/msg02940.html)
While since then working on performance and stability, we provided
some source code updates. Current user and kernel code is available at
gitorious.org/softiwarp. Please see the CHANGES file in the
kernel/ directory for a summary of the most recent changes.
For more convenient testing, the latest update now allows for a
stand-alone build of the kernel module without full kernel source
code access. We tested the code with kernel version 2.6.34. If
you are interested in a full software RDMA stack on Ethernet,
please try it out.
In the hope of providing useful information, I put
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org on copy. Subscribers of this list,
please put me on private cc in case you reply or comment, since
I am not subscribed to the list.
We would be more than happy if you netdev folks would consider
a hardware independent RDMA kernel service as something useful and
potentially to be integrated into the mainline network stack.
Why might it be useful?
A software RDMA stack makes the semantic advantages of
asynchronous and one-sided communication available while obsoleting
the need to deploy dedicated RDMA hardware or any protocol offloading
(while not matching the lowest delay numbers of real RDMA hardware).
Implementing the IETF's iWARP protocol stack on top of TCP kernel
sockets, softiwarp integrates with the open fabrics environment
and thus exports the RDMA kernel and user verbs interface.
The efficiency of the Linux TCP/IP network stack together with intrinsic
advantages of the RDMA communication model (async. posting of work
and reaping of work completions, transfer of send buffer ownership
to the kernel which enables zero copy transmit, peer data placement
without application scheduling, one-sided remote read operations etc.)
can result in improved application-to-application performance and
less CPU load, while using the unchanged kernel TCP stack.
A software RDMA stack might promote wider RDMA deployment,
since when using the host TCP stack, it enables RDMA semantic
independent of dedicated hardware. softiwarp peers with real
RNICs (tested with Chelsio's T3 adapter).
softiwarp is still work in progress and we are very thankful for any
suggestions/comments/bug reports. Please advise how we should proceed
to bring the stack further to your attention. Would it be useful to
provide patches against the current stable kernel version or the next
release candidate?
Many thanks,
Bernard.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* scheduling while atomic: br2684ctl (atm)
From: Mikko Vinni @ 2010-09-22 7:42 UTC (permalink / raw)
To: Karl Hiramoto
Cc: David S. Miller, Chas Williams - CONTRACTOR, netdev, linux-kernel
Hi all,
I get the following message apparently every time (on 2.6.36-rc4+ at least) when
killing any old br2684ctl processes. "unregister_atmdevice_notifier" was added
by
7313bb8f ("atm: propagate signal changes via notifier") so perhaps the
unregister
part was not tested properly for rcu interaction?
So far I haven't noticed any ill effects from the message. Let me know if I
should test something. Thanks.
Mikko
[29874.827053] PM: restore of devices complete after 3623.342 msecs
[29874.827053] wlan0: Trigger new scan to find an IBSS to join
[29875.020370] wlan0: Creating new IBSS network, BSSID 8a:4c:35:ef:eb:6b
[29875.613701] wlan0: no IPv6 routers present
[29876.027033] nas0: no IPv6 routers present
[29876.831216] cxacru 3-1:1.0: receive of cm 0x90 failed (-104)
[29876.844328] r8169 0000:09:00.0: PME# enabled
[29876.878731] snapshot_ioctl: ioctl '4004330c' is deprecated and will be
removed soon, update your suspend-to-disk utilities
[29876.878741] Restarting tasks ... done.
[29876.903718] PM: Basic memory bitmaps freed
[29876.903718] video LNXVIDEO:01: Restoring backlight state
[29879.703963] cxacru 3-1:1.0: found firmware cxacru-fw.bin
[29879.708273] cxacru 3-1:1.0: loading firmware
[29881.277932] cxacru 3-1:1.0: starting device
[29882.346357] cxacru0: ADSL USB MODEM (usb-0000:00:12.0-1) 00:04:ed:09:1e:5a
[29882.362575] ATM dev 0: ADSL state: running
[29882.362593] ATM dev 0: ADSL line: down
[29882.580484] BUG: scheduling while atomic: br2684ctl/28543/0x00000002
[29882.580498] Modules linked in: nls_cp437 vfat fat usb_storage cpufreq_stats
iptable_filter ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack
nf_defrag_ipv4 ip_tables x_tables br2684 ipv6 sco bnep l2cap bluetooth ext2
cxacru arc4 ecb usbatm atm uvcvideo videodev v4l1_compat v4l2_compat_ioctl32
snd_seq_dummy snd_seq_oss snd_hda_codec_atihdmi snd_seq_midi_event
snd_hda_codec_idt snd_seq snd_seq_device ath5k snd_hda_intel snd_pcm_oss
snd_hda_codec snd_mixer_oss mac80211 joydev ath snd_hwdep snd_pcm video ohci_hcd
hp_wmi output snd_timer cfg80211 ehci_hcd hp_accel lis3lv02d battery rfkill
input_polldev snd wmi thermal ohci1394 psmouse jmb38x_ms pcspkr ac edac_core
i2c_piix4 sg soundcore usbcore snd_page_alloc button serio_raw evdev memstick
powernow_k8 led_class r8169 processor k10temp mii ieee1394 mperf rtc_cmos
rtc_core rtc_lib ext4 mbcache jbd2 crc16 sr_mod cdrom sd_mod ahci libahci
pata_atiixp pata_acpi libata scsi_mod radeon ttm drm_kms_helper drm i2c_algo_bit
i2c_core [last unloaded: mmc_core]
[29882.580796] Pid: 28543, comm: br2684ctl Not tainted
2.6.36-rc4-CUST-00214-g2422084 #49
[29882.580808] Call Trace:
[29882.580845] [<ffffffff8103cfd1>] __schedule_bug+0x61/0x70
[29882.580865] [<ffffffff8131202e>] schedule+0x8de/0xa90
[29882.580882] [<ffffffff81312745>] schedule_timeout+0x215/0x350
[29882.580900] [<ffffffff8127f470>] ? flush_backlog+0x0/0x120
[29882.580924] [<ffffffff81080722>] ? smp_call_function_single+0x172/0x190
[29882.580937] [<ffffffff8127f470>] ? flush_backlog+0x0/0x120
[29882.580951] [<ffffffff81311610>] wait_for_common+0xc0/0x150
[29882.580968] [<ffffffff81046050>] ? default_wake_function+0x0/0x10
[29882.580985] [<ffffffff81311748>] wait_for_completion+0x18/0x20
[29882.581004] [<ffffffff810a95d6>] synchronize_rcu+0x46/0x50
[29882.581025] [<ffffffff810683a0>] ? wakeme_after_rcu+0x0/0x10
[29882.581051] [<ffffffff81070eb0>] atomic_notifier_chain_unregister+0x60/0x80
[29882.581083] [<ffffffffa050ddc3>] unregister_atmdevice_notifier+0x13/0x20
[atm]
[29882.581102] [<ffffffffa05d588d>] br2684_push+0x2bd/0x320 [br2684]
[29882.581124] [<ffffffffa050e2f6>] vcc_release+0x76/0x130 [atm]
[29882.581142] [<ffffffff8126ef94>] sock_release+0x24/0x90
[29882.581155] [<ffffffff8126f012>] sock_close+0x12/0x30
[29882.581174] [<ffffffff8110c5c5>] fput+0xd5/0x230
[29882.581188] [<ffffffff81108edb>] filp_close+0x5b/0x80
[29882.581207] [<ffffffff8104ee67>] put_files_struct+0x97/0x100
[29882.581221] [<ffffffff8104ef8d>] exit_files+0x4d/0x60
[29882.581234] [<ffffffff8104f118>] do_exit+0x178/0x810
[29882.581256] [<ffffffff8100cc9c>] ? fpu_finit+0x1c/0x30
[29882.581270] [<ffffffff8104fa3f>] do_group_exit+0x4f/0xb0
[29882.581283] [<ffffffff8104fab2>] sys_exit_group+0x12/0x20
[29882.581300] [<ffffffff81002e82>] system_call_fastpath+0x16/0x1b
[29883.353415] ATM dev 0: ADSL line: initializing
[29884.359446] ATM dev 0: ADSL line: down
[29887.862669] ata3.00: configured for UDMA/100
[29887.862688] ata3: EH complete
^ permalink raw reply
* Re: [RFC] skge: limit DMA to 32 bit
From: Stanislaw Gruszka @ 2010-09-22 7:34 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
In-Reply-To: <20100921080253.3d89d60a@nehalam>
On Tue, Sep 21, 2010 at 08:02:53AM -0700, Stephen Hemminger wrote:
> > Is 32bit DMA limit for every skge device acceptable patch?
>
> No. The device does support 64 bit DMA, the problem is a crap implementation
> of the device the motherboard. Therefore a PCI quirk or module parameter
> is a better solution.
Ok, I will use dmi_check_system() to recognize broken board and limit DMA
address space when detected.
Thanks
Stanislaw
^ permalink raw reply
* Re: [PATCH 4/6] netfilter: fix a race in nf_ct_ext_create()
From: Patrick McHardy @ 2010-09-22 7:28 UTC (permalink / raw)
To: Eric Dumazet; +Cc: davem, netfilter-devel, netdev
In-Reply-To: <1285140220.6378.211.camel@edumazet-laptop>
Am 22.09.2010 09:23, schrieb Eric Dumazet:
> Le mercredi 22 septembre 2010 à 09:17 +0200, kaber@trash.net a écrit :
>> From: Eric Dumazet <Eric Dumazet>
>>
>
> strange email address ;)
Indeed, cut-and-paste error, sorry :)
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 4/6] netfilter: fix a race in nf_ct_ext_create()
From: Eric Dumazet @ 2010-09-22 7:23 UTC (permalink / raw)
To: kaber; +Cc: davem, netfilter-devel, netdev
In-Reply-To: <1285139854-11827-5-git-send-email-kaber@trash.net>
Le mercredi 22 septembre 2010 à 09:17 +0200, kaber@trash.net a écrit :
> From: Eric Dumazet <Eric Dumazet>
>
strange email address ;)
> As soon as rcu_read_unlock() is called, there is no guarantee current
> thread can safely derefence t pointer, rcu protected.
>
> Fix is to copy t->alloc_size in a temporary variable.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Signed-off-by: Patrick McHardy <kaber@trash.net>
> ---
> net/netfilter/nf_conntrack_extend.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/net/netfilter/nf_conntrack_extend.c b/net/netfilter/nf_conntrack_extend.c
> index 7dcf7a4..8d9e4c9 100644
> --- a/net/netfilter/nf_conntrack_extend.c
> +++ b/net/netfilter/nf_conntrack_extend.c
> @@ -48,15 +48,17 @@ nf_ct_ext_create(struct nf_ct_ext **ext, enum nf_ct_ext_id id, gfp_t gfp)
> {
> unsigned int off, len;
> struct nf_ct_ext_type *t;
> + size_t alloc_size;
>
> rcu_read_lock();
> t = rcu_dereference(nf_ct_ext_types[id]);
> BUG_ON(t == NULL);
> off = ALIGN(sizeof(struct nf_ct_ext), t->align);
> len = off + t->len;
> + alloc_size = t->alloc_size;
> rcu_read_unlock();
>
> - *ext = kzalloc(t->alloc_size, gfp);
> + *ext = kzalloc(alloc_size, gfp);
> if (!*ext)
> return NULL;
>
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH 5/6] netfilter: nf_nat_snmp: fix checksum calculation (v4)
From: kaber @ 2010-09-22 7:17 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, netdev
In-Reply-To: <1285139854-11827-1-git-send-email-kaber@trash.net>
From: Patrick McHardy <kaber@trash.net>
Fix checksum calculation in nf_nat_snmp_basic.
Based on patches by Clark Wang <wtweeker@163.com> and
Stephen Hemminger <shemminger@vyatta.com>.
https://bugzilla.kernel.org/show_bug.cgi?id=17622
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
net/ipv4/netfilter/nf_nat_snmp_basic.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c
index 1679e2c..ee5f419 100644
--- a/net/ipv4/netfilter/nf_nat_snmp_basic.c
+++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c
@@ -893,13 +893,15 @@ static void fast_csum(__sum16 *csum,
unsigned char s[4];
if (offset & 1) {
- s[0] = s[2] = 0;
+ s[0] = ~0;
s[1] = ~*optr;
+ s[2] = 0;
s[3] = *nptr;
} else {
- s[1] = s[3] = 0;
s[0] = ~*optr;
+ s[1] = ~0;
s[2] = *nptr;
+ s[3] = 0;
}
*csum = csum_fold(csum_partial(s, 4, ~csum_unfold(*csum)));
--
1.7.1
^ permalink raw reply related
* [PATCH 4/6] netfilter: fix a race in nf_ct_ext_create()
From: kaber @ 2010-09-22 7:17 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, netdev
In-Reply-To: <1285139854-11827-1-git-send-email-kaber@trash.net>
From: Eric Dumazet <Eric Dumazet>
As soon as rcu_read_unlock() is called, there is no guarantee current
thread can safely derefence t pointer, rcu protected.
Fix is to copy t->alloc_size in a temporary variable.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
net/netfilter/nf_conntrack_extend.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/net/netfilter/nf_conntrack_extend.c b/net/netfilter/nf_conntrack_extend.c
index 7dcf7a4..8d9e4c9 100644
--- a/net/netfilter/nf_conntrack_extend.c
+++ b/net/netfilter/nf_conntrack_extend.c
@@ -48,15 +48,17 @@ nf_ct_ext_create(struct nf_ct_ext **ext, enum nf_ct_ext_id id, gfp_t gfp)
{
unsigned int off, len;
struct nf_ct_ext_type *t;
+ size_t alloc_size;
rcu_read_lock();
t = rcu_dereference(nf_ct_ext_types[id]);
BUG_ON(t == NULL);
off = ALIGN(sizeof(struct nf_ct_ext), t->align);
len = off + t->len;
+ alloc_size = t->alloc_size;
rcu_read_unlock();
- *ext = kzalloc(t->alloc_size, gfp);
+ *ext = kzalloc(alloc_size, gfp);
if (!*ext)
return NULL;
--
1.7.1
^ permalink raw reply related
* [PATCH 1/6] netfilter: tproxy: nf_tproxy_assign_sock() can handle tw sockets
From: kaber @ 2010-09-22 7:17 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, netdev
In-Reply-To: <1285139854-11827-1-git-send-email-kaber@trash.net>
From: Eric Dumazet <eric.dumazet@gmail.com>
transparent field of a socket is either inet_twsk(sk)->tw_transparent
for timewait sockets, or inet_sk(sk)->transparent for other sockets
(TCP/UDP).
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
net/netfilter/nf_tproxy_core.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/net/netfilter/nf_tproxy_core.c b/net/netfilter/nf_tproxy_core.c
index 5490fc3..daab8c4 100644
--- a/net/netfilter/nf_tproxy_core.c
+++ b/net/netfilter/nf_tproxy_core.c
@@ -70,7 +70,11 @@ nf_tproxy_destructor(struct sk_buff *skb)
int
nf_tproxy_assign_sock(struct sk_buff *skb, struct sock *sk)
{
- if (inet_sk(sk)->transparent) {
+ bool transparent = (sk->sk_state == TCP_TIME_WAIT) ?
+ inet_twsk(sk)->tw_transparent :
+ inet_sk(sk)->transparent;
+
+ if (transparent) {
skb_orphan(skb);
skb->sk = sk;
skb->destructor = nf_tproxy_destructor;
--
1.7.1
^ permalink raw reply related
* [PATCH 6/6] netfilter: nf_conntrack_defrag: check socket type before touching nodefrag flag
From: kaber @ 2010-09-22 7:17 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, netdev
In-Reply-To: <1285139854-11827-1-git-send-email-kaber@trash.net>
From: Jiri Olsa <jolsa@redhat.com>
we need to check proper socket type within ipv4_conntrack_defrag
function before referencing the nodefrag flag.
For example the tun driver receive path produces skbs with
AF_UNSPEC socket type, and so current code is causing unwanted
fragmented packets going out.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
net/ipv4/netfilter/nf_defrag_ipv4.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/netfilter/nf_defrag_ipv4.c b/net/ipv4/netfilter/nf_defrag_ipv4.c
index eab8de3..f3a9b42 100644
--- a/net/ipv4/netfilter/nf_defrag_ipv4.c
+++ b/net/ipv4/netfilter/nf_defrag_ipv4.c
@@ -66,9 +66,11 @@ static unsigned int ipv4_conntrack_defrag(unsigned int hooknum,
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
+ struct sock *sk = skb->sk;
struct inet_sock *inet = inet_sk(skb->sk);
- if (inet && inet->nodefrag)
+ if (sk && (sk->sk_family == PF_INET) &&
+ inet->nodefrag)
return NF_ACCEPT;
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
--
1.7.1
^ permalink raw reply related
* [PATCH 3/6] netfilter: fix ipt_REJECT TCP RST routing for indev == outdev
From: kaber @ 2010-09-22 7:17 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, netdev
In-Reply-To: <1285139854-11827-1-git-send-email-kaber@trash.net>
From: Changli Gao <xiaosuo@gmail.com>
ip_route_me_harder can't create the route cache when the outdev is the same
with the indev for the skbs whichout a valid protocol set.
__mkroute_input functions has this check:
1998 if (skb->protocol != htons(ETH_P_IP)) {
1999 /* Not IP (i.e. ARP). Do not create route, if it is
2000 * invalid for proxy arp. DNAT routes are always valid.
2001 *
2002 * Proxy arp feature have been extended to allow, ARP
2003 * replies back to the same interface, to support
2004 * Private VLAN switch technologies. See arp.c.
2005 */
2006 if (out_dev == in_dev &&
2007 IN_DEV_PROXY_ARP_PVLAN(in_dev) == 0) {
2008 err = -EINVAL;
2009 goto cleanup;
2010 }
2011 }
This patch gives the new skb a valid protocol to bypass this check. In order
to make ipt_REJECT work with bridges, you also need to enable ip_forward.
This patch also fixes a regression. When we used skb_copy_expand(), we
didn't have this issue stated above, as the protocol was properly set.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
net/ipv4/netfilter/ipt_REJECT.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c
index b254daf..43eec80 100644
--- a/net/ipv4/netfilter/ipt_REJECT.c
+++ b/net/ipv4/netfilter/ipt_REJECT.c
@@ -112,6 +112,7 @@ static void send_reset(struct sk_buff *oldskb, int hook)
/* ip_route_me_harder expects skb->dst to be set */
skb_dst_set_noref(nskb, skb_dst(oldskb));
+ nskb->protocol = htons(ETH_P_IP);
if (ip_route_me_harder(nskb, addr_type))
goto free_nskb;
--
1.7.1
^ permalink raw reply related
* [PATCH 2/6] netfilter: nf_ct_sip: default to NF_ACCEPT in sip_help_tcp()
From: kaber @ 2010-09-22 7:17 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, netdev
In-Reply-To: <1285139854-11827-1-git-send-email-kaber@trash.net>
From: Simon Horman <horms@verge.net.au>
I initially noticed this because of the compiler warning below, but it
does seem to be a valid concern in the case where ct_sip_get_header()
returns 0 in the first iteration of the while loop.
net/netfilter/nf_conntrack_sip.c: In function 'sip_help_tcp':
net/netfilter/nf_conntrack_sip.c:1379: warning: 'ret' may be used uninitialized in this function
Signed-off-by: Simon Horman <horms@verge.net.au>
[Patrick: changed NF_DROP to NF_ACCEPT]
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
net/netfilter/nf_conntrack_sip.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c
index 53d8922..f64de95 100644
--- a/net/netfilter/nf_conntrack_sip.c
+++ b/net/netfilter/nf_conntrack_sip.c
@@ -1376,7 +1376,7 @@ static int sip_help_tcp(struct sk_buff *skb, unsigned int protoff,
unsigned int msglen, origlen;
const char *dptr, *end;
s16 diff, tdiff = 0;
- int ret;
+ int ret = NF_ACCEPT;
typeof(nf_nat_sip_seq_adjust_hook) nf_nat_sip_seq_adjust;
if (ctinfo != IP_CT_ESTABLISHED &&
--
1.7.1
^ permalink raw reply related
* [PATCH 0/6] netfilter: netfilter fixes
From: kaber @ 2010-09-22 7:17 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, netdev
Hi Dave,
the following patches against net-2.6.git fix a few netfilter problems:
- tproxy is not properly handling time-wait sockets, from Eric
- a fix for use of an uninitizalized variable in the TCP SIP tracking,
from Simon
- a fix for TCP RST routing with bridges, from Changli
- a fix for a RCU race in nf_ct_ext_create(), from Eric
- a checksum calculation fix for the SNMP NAT helper, from myself,
based on a patch from Clark Weng and Stephen
- a fix for incorrectly skipped conntrack defragmentation with the tun
driver. from Jiri Olsa
Please apply or pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6.git master
Thanks!
^ permalink raw reply
* Re: [2.6.36-rc5] INET?: possible irq lock inversion dependency
From: Tetsuo Handa @ 2010-09-22 7:14 UTC (permalink / raw)
To: eric.dumazet; +Cc: linux-fsdevel, netdev
In-Reply-To: <1285064011.2617.238.camel@edumazet-laptop>
I established steps to reproduce this warning using clean 2.6.36-rc5 .
[ 37.539697] =========================================================
[ 37.541991] [ INFO: possible irq lock inversion dependency detected ]
[ 37.541991] 2.6.36-rc5 #1
[ 37.541991] ---------------------------------------------------------
[ 37.541991] mount/2681 just changed the state of lock:
[ 37.541991] (clock-AF_INET){++.?..}, at: [<c135e03c>] xs_udp_write_space+0x1c/0x50
[ 37.541991] but this lock was taken by another, SOFTIRQ-safe lock in the past:
[ 37.541991] (slock-AF_INET){+.-...}
[ 37.541991]
[ 37.541991] and interrupts could create inverse lock ordering between them.
[ 37.541991]
[ 37.541991]
[ 37.541991] other info that might help us debug this:
[ 37.541991] no locks held by mount/2681.
[ 37.541991]
[ 37.541991] the shortest dependencies between 2nd lock and 1st lock:
[ 37.541991] -> (slock-AF_INET){+.-...} ops: 562 {
[ 37.541991] HARDIRQ-ON-W at:
[ 37.541991] [<c106a8de>] mark_irqflags+0xfe/0x180
[ 37.541991] [<c106b65d>] __lock_acquire+0x38d/0x8e0
[ 37.541991] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 37.541991] [<c138be2e>] _raw_spin_lock_bh+0x3e/0x80
[ 37.541991] [<c12daf39>] lock_sock_fast+0x29/0x90
[ 37.541991] [<c132b1a4>] udp_destroy_sock+0x14/0x40
[ 37.541991] [<c12db293>] sk_common_release+0xb3/0xc0
[ 37.541991] [<c132bb18>] udp_lib_close+0x8/0x10
[ 37.541991] [<c1331a7e>] inet_release+0xbe/0x100
[ 37.541991] [<c12d5476>] sock_release+0x66/0x80
[ 37.541991] [<c12d61f2>] sock_close+0x12/0x30
[ 37.541991] [<c10c637b>] __fput+0x1cb/0x240
[ 37.541991] [<c10c6409>] fput+0x19/0x20
[ 37.541991] [<c10c4263>] filp_close+0x43/0x70
[ 37.541991] [<c103fdcd>] close_files+0xad/0x150
[ 37.541991] [<c103fed9>] put_files_struct+0x29/0xf0
[ 37.541991] [<c1040030>] exit_files+0x40/0x50
[ 37.541991] [<c10406f6>] do_exit+0x116/0x2e0
[ 37.541991] [<c1040924>] do_group_exit+0x34/0xb0
[ 37.541991] [<c10409af>] sys_exit_group+0xf/0x20
[ 37.541991] [<c138c8d1>] syscall_call+0x7/0xb
[ 37.541991] IN-SOFTIRQ-W at:
[ 37.541991] [<c106a8fe>] mark_irqflags+0x11e/0x180
[ 37.541991] [<c106b65d>] __lock_acquire+0x38d/0x8e0
[ 37.541991] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 37.541991] [<c138bcb9>] _raw_spin_lock+0x39/0x70
[ 37.541991] [<c12d98d1>] sk_clone+0xb1/0x2c0
[ 37.541991] [<c130fd7a>] inet_csk_clone+0x1a/0xb0
[ 37.541991] [<c132535c>] tcp_create_openreq_child+0x1c/0x460
[ 37.541991] [<c1322a2f>] tcp_v4_syn_recv_sock+0x3f/0x1e0
[ 37.940862] [<c132592c>] tcp_check_req+0x18c/0x3b0
[ 37.940862] [<c1322c1d>] tcp_v4_hnd_req+0x4d/0x160
[ 37.940862] [<c1322f49>] tcp_v4_do_rcv+0x159/0x280
[ 37.940862] [<c13235e4>] tcp_v4_rcv+0x574/0xa30
[ 37.940862] [<c1305443>] ip_local_deliver_finish+0x103/0x320
[ 37.940862] [<c1305690>] ip_local_deliver+0x30/0x40
[ 37.940862] [<c1305809>] ip_rcv_finish+0x169/0x480
[ 37.940862] [<c1305cba>] ip_rcv+0x19a/0x2b0
[ 37.940862] [<c12e691d>] __netif_receive_skb+0x21d/0x310
[ 37.940862] [<c12e7428>] process_backlog+0x88/0x160
[ 37.940862] [<c12e77f7>] net_rx_action+0x127/0x140
[ 37.940862] [<c1042e70>] __do_softirq+0xd0/0x130
[ 37.940862] INITIAL USE at:
[ 37.940862] [<c106b490>] __lock_acquire+0x1c0/0x8e0
[ 37.940862] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 37.940862] [<c138be2e>] _raw_spin_lock_bh+0x3e/0x80
[ 37.940862] [<c12daf39>] lock_sock_fast+0x29/0x90
[ 37.940862] [<c132b1a4>] udp_destroy_sock+0x14/0x40
[ 37.940862] [<c12db293>] sk_common_release+0xb3/0xc0
[ 37.940862] [<c132bb18>] udp_lib_close+0x8/0x10
[ 37.940862] [<c1331a7e>] inet_release+0xbe/0x100
[ 37.940862] [<c12d5476>] sock_release+0x66/0x80
[ 37.940862] [<c12d61f2>] sock_close+0x12/0x30
[ 37.940862] [<c10c637b>] __fput+0x1cb/0x240
[ 37.940862] [<c10c6409>] fput+0x19/0x20
[ 37.940862] [<c10c4263>] filp_close+0x43/0x70
[ 37.940862] [<c103fdcd>] close_files+0xad/0x150
[ 37.940862] [<c103fed9>] put_files_struct+0x29/0xf0
[ 37.940862] [<c1040030>] exit_files+0x40/0x50
[ 37.940862] [<c10406f6>] do_exit+0x116/0x2e0
[ 37.940862] [<c1040924>] do_group_exit+0x34/0xb0
[ 37.940862] [<c10409af>] sys_exit_group+0xf/0x20
[ 37.940862] [<c138c8d1>] syscall_call+0x7/0xb
[ 37.940862] }
[ 37.940862] ... key at: [<c1d4c9d0>] af_family_slock_keys+0x10/0x140
[ 37.940862] ... acquired at:
[ 37.940862] [<c106910b>] check_prevs_add+0xab/0x100
[ 37.940862] [<c1069495>] validate_chain+0x305/0x5a0
[ 37.940862] [<c106b57d>] __lock_acquire+0x2ad/0x8e0
[ 37.940862] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 37.940862] [<c138c46e>] _raw_write_lock_bh+0x3e/0x80
[ 37.940862] [<c13100a6>] inet_csk_listen_stop+0x86/0x160
[ 37.940862] [<c1312c02>] tcp_close+0x382/0x390
[ 37.940862] [<c1331a7e>] inet_release+0xbe/0x100
[ 37.940862] [<c12d5476>] sock_release+0x66/0x80
[ 37.940862] [<c12d61f2>] sock_close+0x12/0x30
[ 37.940862] [<c10c637b>] __fput+0x1cb/0x240
[ 37.940862] [<c10c6409>] fput+0x19/0x20
[ 37.940862] [<c10c4263>] filp_close+0x43/0x70
[ 37.940862] [<c10c42fd>] sys_close+0x6d/0x110
[ 37.940862] [<c138c8d1>] syscall_call+0x7/0xb
[ 37.940862]
[ 37.940862] -> (clock-AF_INET){++.?..} ops: 72 {
[ 37.940862] HARDIRQ-ON-W at:
[ 37.940862] [<c106a8de>] mark_irqflags+0xfe/0x180
[ 37.940862] [<c106b65d>] __lock_acquire+0x38d/0x8e0
[ 37.940862] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 37.940862] [<c138c46e>] _raw_write_lock_bh+0x3e/0x80
[ 37.940862] [<c12db20f>] sk_common_release+0x2f/0xc0
[ 37.940862] [<c132bb18>] udp_lib_close+0x8/0x10
[ 37.940862] [<c1331a7e>] inet_release+0xbe/0x100
[ 37.940862] [<c12d5476>] sock_release+0x66/0x80
[ 37.940862] [<c12d61f2>] sock_close+0x12/0x30
[ 37.940862] [<c10c637b>] __fput+0x1cb/0x240
[ 37.940862] [<c10c6409>] fput+0x19/0x20
[ 37.940862] [<c10c4263>] filp_close+0x43/0x70
[ 37.940862] [<c103fdcd>] close_files+0xad/0x150
[ 37.940862] [<c103fed9>] put_files_struct+0x29/0xf0
[ 37.940862] [<c1040030>] exit_files+0x40/0x50
[ 37.940862] [<c10406f6>] do_exit+0x116/0x2e0
[ 37.940862] [<c1040924>] do_group_exit+0x34/0xb0
[ 37.940862] [<c10409af>] sys_exit_group+0xf/0x20
[ 37.940862] [<c138c8d1>] syscall_call+0x7/0xb
[ 37.940862] HARDIRQ-ON-R at:
[ 37.940862] [<c106a84e>] mark_irqflags+0x6e/0x180
[ 37.940862] [<c106b65d>] __lock_acquire+0x38d/0x8e0
[ 37.940862] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 37.940862] [<c138bfd9>] _raw_read_lock+0x39/0x70
[ 37.940862] [<c135ddae>] xs_tcp_state_change+0x1e/0x1d0
[ 37.940862] [<c131bd38>] tcp_rcv_synsent_state_process+0x398/0x590
[ 37.940862] [<c131c3d7>] tcp_rcv_state_process+0x4a7/0x560
[ 37.940862] [<c1322e61>] tcp_v4_do_rcv+0x71/0x280
[ 37.940862] [<c12da206>] __release_sock+0x66/0x150
[ 37.940862] [<c12daf07>] release_sock+0x87/0x90
[ 37.940862] [<c1331e6a>] inet_stream_connect+0x5a/0x1b0
[ 37.940862] [<c12d7d68>] kernel_connect+0x18/0x30
[ 37.940862] [<c135ea5e>] xs_tcp_finish_connecting+0x4e/0x120
[ 37.940862] [<c135eb8b>] xs_tcp_setup_socket+0x5b/0x180
[ 37.940862] [<c135edc4>] xs_tcp_connect_worker4+0x14/0x20
[ 37.940862] [<c1051547>] process_one_work+0x147/0x3a0
[ 37.940862] [<c1051886>] worker_thread+0xa6/0x200
[ 37.940862] [<c1056765>] kthread+0x75/0x80
[ 37.940862] [<c10031fa>] kernel_thread_helper+0x6/0x1c
[ 37.940862] IN-SOFTIRQ-R at:
[ 37.940862] [<c106a8fe>] mark_irqflags+0x11e/0x180
[ 37.940862] [<c106b65d>] __lock_acquire+0x38d/0x8e0
[ 37.940862] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 37.940862] [<c138bfd9>] _raw_read_lock+0x39/0x70
[ 37.940862] [<c135dc81>] xs_tcp_data_ready+0x21/0x90
[ 37.940862] [<c131a1f8>] tcp_data_queue+0x248/0x820
[ 37.940862] [<c131b56e>] tcp_rcv_established+0xae/0x4e0
[ 37.940862] [<c1322fc1>] tcp_v4_do_rcv+0x1d1/0x280
[ 37.940862] [<c13235e4>] tcp_v4_rcv+0x574/0xa30
[ 37.940862] [<c1305443>] ip_local_deliver_finish+0x103/0x320
[ 37.940862] [<c1305690>] ip_local_deliver+0x30/0x40
[ 37.940862] [<c1305809>] ip_rcv_finish+0x169/0x480
[ 37.940862] [<c1305cba>] ip_rcv+0x19a/0x2b0
[ 37.940862] [<c12e691d>] __netif_receive_skb+0x21d/0x310
[ 37.940862] [<c12e7428>] process_backlog+0x88/0x160
[ 37.940862] [<c12e77f7>] net_rx_action+0x127/0x140
[ 37.940862] [<c1042e70>] __do_softirq+0xd0/0x130
[ 37.940862] SOFTIRQ-ON-R at:
[ 37.940862] [<c106a8c2>] mark_irqflags+0xe2/0x180
[ 37.940862] [<c106b65d>] __lock_acquire+0x38d/0x8e0
[ 37.940862] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 37.940862] [<c138bfd9>] _raw_read_lock+0x39/0x70
[ 37.940862] [<c135e03c>] xs_udp_write_space+0x1c/0x50
[ 37.940862] [<c135e14a>] xs_udp_do_set_buffer_size+0x8a/0x90
[ 37.940862] [<c135e18d>] xs_udp_set_buffer_size+0x3d/0x40
[ 37.940862] [<c13594d8>] rpc_setbufsize+0x28/0x30
[ 37.940862] [<e0967314>] nfs_server_set_fsinfo+0x364/0x400 [nfs]
[ 37.940862] [<e0967415>] nfs_probe_fsinfo+0x65/0x100 [nfs]
[ 37.940862] [<e0967717>] nfs_create_server+0x87/0x240 [nfs]
[ 37.940862] [<e0971aeb>] nfs_get_sb+0x8b/0x240 [nfs]
[ 37.940862] [<c10c7f41>] vfs_kern_mount+0x71/0x190
[ 37.940862] [<c10c8287>] do_kern_mount+0x37/0x90
[ 37.940862] [<c10de6c7>] do_new_mount+0x57/0xa0
[ 37.940862] [<c10decc1>] do_mount+0x171/0x1b0
[ 37.940862] [<c10defbc>] sys_mount+0x6c/0xa0
[ 37.940862] [<c138c8d1>] syscall_call+0x7/0xb
[ 37.940862] INITIAL USE at:
[ 37.940862] [<c106b490>] __lock_acquire+0x1c0/0x8e0
[ 37.940862] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 37.940862] [<c138c46e>] _raw_write_lock_bh+0x3e/0x80
[ 37.940862] [<c12db20f>] sk_common_release+0x2f/0xc0
[ 37.940862] [<c132bb18>] udp_lib_close+0x8/0x10
[ 37.940862] [<c1331a7e>] inet_release+0xbe/0x100
[ 37.940862] [<c12d5476>] sock_release+0x66/0x80
[ 37.940862] [<c12d61f2>] sock_close+0x12/0x30
[ 37.940862] [<c10c637b>] __fput+0x1cb/0x240
[ 37.940862] [<c10c6409>] fput+0x19/0x20
[ 37.940862] [<c10c4263>] filp_close+0x43/0x70
[ 37.940862] [<c103fdcd>] close_files+0xad/0x150
[ 37.940862] [<c103fed9>] put_files_struct+0x29/0xf0
[ 37.940862] [<c1040030>] exit_files+0x40/0x50
[ 37.940862] [<c10406f6>] do_exit+0x116/0x2e0
[ 37.940862] [<c1040924>] do_group_exit+0x34/0xb0
[ 37.940862] [<c10409af>] sys_exit_group+0xf/0x20
[ 37.940862] [<c138c8d1>] syscall_call+0x7/0xb
[ 37.940862] }
[ 37.940862] ... key at: [<c1d4cb10>] af_callback_keys+0x10/0x130
[ 37.940862] ... acquired at:
[ 37.940862] [<c1069d46>] check_usage_backwards+0x76/0xd0
[ 37.940862] [<c1069f59>] mark_lock_irq+0x99/0x240
[ 37.940862] [<c106abfc>] mark_lock+0x21c/0x3c0
[ 37.940862] [<c106a8c2>] mark_irqflags+0xe2/0x180
[ 37.940862] [<c106b65d>] __lock_acquire+0x38d/0x8e0
[ 37.940862] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 37.940862] [<c138bfd9>] _raw_read_lock+0x39/0x70
[ 37.940862] [<c135e03c>] xs_udp_write_space+0x1c/0x50
[ 37.940862] [<c135e14a>] xs_udp_do_set_buffer_size+0x8a/0x90
[ 37.940862] [<c135e18d>] xs_udp_set_buffer_size+0x3d/0x40
[ 37.940862] [<c13594d8>] rpc_setbufsize+0x28/0x30
[ 37.940862] [<e0967314>] nfs_server_set_fsinfo+0x364/0x400 [nfs]
[ 37.940862] [<e0967415>] nfs_probe_fsinfo+0x65/0x100 [nfs]
[ 37.940862] [<e0967717>] nfs_create_server+0x87/0x240 [nfs]
[ 37.940862] [<e0971aeb>] nfs_get_sb+0x8b/0x240 [nfs]
[ 37.940862] [<c10c7f41>] vfs_kern_mount+0x71/0x190
[ 37.940862] [<c10c8287>] do_kern_mount+0x37/0x90
[ 37.940862] [<c10de6c7>] do_new_mount+0x57/0xa0
[ 37.940862] [<c10decc1>] do_mount+0x171/0x1b0
[ 37.940862] [<c10defbc>] sys_mount+0x6c/0xa0
[ 37.940862] [<c138c8d1>] syscall_call+0x7/0xb
[ 37.940862]
[ 37.940862]
[ 37.940862] stack backtrace:
[ 37.940862] Pid: 2681, comm: mount Not tainted 2.6.36-rc5 #1
[ 37.940862] Call Trace:
[ 37.940862] [<c103deb8>] ? printk+0x18/0x20
[ 37.940862] [<c1069bd8>] print_irq_inversion_bug+0x108/0x120
[ 37.940862] [<c1069d46>] check_usage_backwards+0x76/0xd0
[ 37.940862] [<c1069f59>] mark_lock_irq+0x99/0x240
[ 37.940862] [<c1069cd0>] ? check_usage_backwards+0x0/0xd0
[ 37.940862] [<c106abfc>] mark_lock+0x21c/0x3c0
[ 37.940862] [<c106a8c2>] mark_irqflags+0xe2/0x180
[ 37.940862] [<c106b65d>] __lock_acquire+0x38d/0x8e0
[ 37.940862] [<c109a5fe>] ? mempool_free_slab+0xe/0x10
[ 37.940862] [<c109a5d8>] ? mempool_free+0x98/0xa0
[ 37.940862] [<c106cbfa>] lock_acquire+0x7a/0xa0
[ 37.940862] [<c135e03c>] ? xs_udp_write_space+0x1c/0x50
[ 37.940862] [<c138bfd9>] _raw_read_lock+0x39/0x70
[ 37.940862] [<c135e03c>] ? xs_udp_write_space+0x1c/0x50
[ 37.940862] [<c135e03c>] xs_udp_write_space+0x1c/0x50
[ 37.940862] [<c135e14a>] xs_udp_do_set_buffer_size+0x8a/0x90
[ 37.940862] [<c135e18d>] xs_udp_set_buffer_size+0x3d/0x40
[ 37.940862] [<c135e150>] ? xs_udp_set_buffer_size+0x0/0x40
[ 37.940862] [<c13594d8>] rpc_setbufsize+0x28/0x30
[ 37.940862] [<e0967314>] nfs_server_set_fsinfo+0x364/0x400 [nfs]
[ 37.940862] [<e0967415>] nfs_probe_fsinfo+0x65/0x100 [nfs]
[ 37.940862] [<c10bf558>] ? cache_alloc_debugcheck_after+0x98/0x1d0
[ 37.940862] [<e096e1d3>] ? nfs_alloc_fattr+0x23/0x30 [nfs]
[ 37.940862] [<e0967717>] nfs_create_server+0x87/0x240 [nfs]
[ 37.940862] [<e096e1f5>] ? nfs_alloc_fhandle+0x15/0x30 [nfs]
[ 37.940862] [<e0971aeb>] nfs_get_sb+0x8b/0x240 [nfs]
[ 37.940862] [<e09719b0>] ? nfs_compare_super+0x0/0x90 [nfs]
[ 37.940862] [<c10c7f41>] vfs_kern_mount+0x71/0x190
[ 37.940862] [<c10dc11c>] ? get_fs_type+0x8c/0xa0
[ 37.940862] [<c10c8287>] do_kern_mount+0x37/0x90
[ 37.940862] [<c10de6c7>] do_new_mount+0x57/0xa0
[ 37.940862] [<c10decc1>] do_mount+0x171/0x1b0
[ 37.940862] [<c10defbc>] sys_mount+0x6c/0xa0
[ 37.940862] [<c138c8d1>] syscall_call+0x7/0xb
Boot and login and run test.sh below
--- test.sh start ---
#! /bin/sh
./a.out
echo 1 > /proc/sys/kernel/printk_delay
mount 127.0.0.1:/usr/src/ /mnt/
umount /mnt/
--- test.sh end ---
where a.out is made by "gcc -Wall -O3 test.c"
--- test.c start ---
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
int main(int argc, char *argv[])
{
int fd1 = socket(AF_INET, SOCK_STREAM, 0);
int fd2 = socket(AF_INET, SOCK_STREAM, 0);
struct sockaddr_in addr = { };
socklen_t size = sizeof(addr);
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
addr.sin_port = htons(0);
bind(fd1, (struct sockaddr *) &addr, sizeof(addr));
listen(fd1, 5);
getsockname(fd1, (struct sockaddr *) &addr, &size);
connect(fd2, (struct sockaddr *) &addr, sizeof(addr));
close(fd1);
close(fd2);
return 0;
}
--- test.c end ---
Config is at http://I-love.SAKURA.ne.jp/tmp/config-2.6.36-rc5
Full log is at http://I-love.SAKURA.ne.jp/tmp/dmesg-2.6.36-rc5.txt
I'm using Debian Sarge on i686.
Regards.
^ permalink raw reply
* Re: [PATCH] net: ipv4,nodefrag: check socket type before touching nodefrag flag
From: Patrick McHardy @ 2010-09-22 6:59 UTC (permalink / raw)
To: Jiri Olsa
Cc: eric.dumazet, jengelh, davem, netdev, netfilter-devel, linux-man
In-Reply-To: <1284974876-4596-1-git-send-email-jolsa@redhat.com>
Am 20.09.2010 11:27, schrieb Jiri Olsa:
> we need to check proper socket type within ipv4_conntrack_defrag
> function before referencing the nodefrag flag.
>
> For example the tun driver receive path produces skbs with
> AF_UNSPEC socket type, and so current code is causing unwanted
> fragmented packets going out.
Looks good. Applied, thanks.
^ permalink raw reply
* Re: tcp_fastretrans_alert since 2.6.32 ?
From: Eric Dumazet @ 2010-09-22 6:48 UTC (permalink / raw)
To: Sunny; +Cc: linux-kernel, netdev, Ilpo Järvinen
In-Reply-To: <AANLkTinnaA3Qgny45BRyW3i5u+nXn1XgWwkxA_QbN8xN@mail.gmail.com>
CC netdev and Ilpo
Le mardi 21 septembre 2010 à 23:37 -0700, Sunny a écrit :
> Hi,
>
> After upgrading to the latest ubuntu kernel, I started to have this
> alert showing up, this is a vm running on ESXi host with vmxnet3
> adapter, mainly serving large traffic ~70Mbps towards overboard
> customers, so I expect packet loss and retrans is pretty high. So I'm
> posting to ask whether others been seeing the same issue? When this
> happens, machine freeze several seconds for about three times in a row
> then seems to start working again.
>
> Please cc me on the thread, thanks in advance.
>
>
> [212670.327617] ------------[ cut here ]------------
> [212670.327689] WARNING: at
> /build/buildd/linux-2.6.32/net/ipv4/tcp_input.c:2919 tcp_fastret
> rans_alert+0x3f9/0xd90()
> [212670.327692] Hardware name: VMware Virtual Platform
> [212670.327693] Modules linked in: btrfs zlib_deflate crc32c libcrc32c
> ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs xfs exportfs
> reiserfs sch_sfq cls_u32 sch_htb nf_conntrack_ipv 6 ip6table_filter
> ip6_tables xt_tcpudp xt_state xt_multiport iptable_filter iptable_nat
> nf_n at nf_conntrack_ipv4 sit nf_conntrack nf_defrag_ipv4 tunnel4
> ip_tables x_tables acpiphp ppde v psmouse parport_pc serio_raw fbcon
> tileblit font bitblit softcursor vmxnet3 vga16fb vgasta te lp parport
> floppy vmw_pvscsi
> [212670.327741] Pid: 0, comm: swapper Not tainted 2.6.32-24-server #42-Ubuntu
> [212670.327742] Call Trace:
> [212670.327744] <IRQ> [<ffffffff81066dab>] warn_slowpath_common+0x7b/0xc0
> [212670.327754] [<ffffffff81066e04>] warn_slowpath_null+0x14/0x20
> [212670.327757] [<ffffffff814b98f9>] tcp_fastretrans_alert+0x3f9/0xd90
> [212670.327759] [<ffffffff814bad24>] tcp_ack+0x284/0x6b0
> [212670.327762] [<ffffffff814bbab0>] tcp_rcv_established+0x400/0x730
> [212670.327766] [<ffffffff814c3553>] tcp_v4_do_rcv+0xf3/0x160
> [212670.327769] [<ffffffff814c4ca5>] tcp_v4_rcv+0x5b5/0x7e0
> [212670.327772] [<ffffffff814a2c00>] ? ip_local_deliver_finish+0x0/0x2d0
> [212670.327776] [<ffffffff8149a6b4>] ? nf_hook_slow+0x74/0x100
> [212670.327779] [<ffffffff814a2c00>] ? ip_local_deliver_finish+0x0/0x2d0
> [212670.327781] [<ffffffff814a2cdd>] ip_local_deliver_finish+0xdd/0x2d0
> [212670.327783] [<ffffffff814a2f60>] ip_local_deliver+0x90/0xa0
> [212670.327785] [<ffffffff814a241d>] ip_rcv_finish+0x12d/0x440
> [212670.327787] [<ffffffff814a29a5>] ip_rcv+0x275/0x360
> [212670.327794] [<ffffffff8147319a>] netif_receive_skb+0x38a/0x5d0
> [212670.327801] [<ffffffffa005203c>]
> vmxnet3_rq_rx_complete+0x23c/0x610 [vmxnet3]
> [212670.327806] [<ffffffffa005245f>] vmxnet3_do_poll+0x4f/0xf0 [vmxnet3]
> [212670.327809] [<ffffffffa005252d>] vmxnet3_poll+0x2d/0x60 [vmxnet3]
> [212670.327816] [<ffffffff810397a9>] ? default_spin_lock_flags+0x9/0x10
> [212670.327820] [<ffffffff81473c8f>] net_rx_action+0x10f/0x250
> [212670.327824] [<ffffffff8106e2f7>] __do_softirq+0xb7/0x1e0
> [212670.327828] [<ffffffff810c4d40>] ? handle_IRQ_event+0x60/0x170
> [212670.327833] [<ffffffff810142ec>] call_softirq+0x1c/0x30
> [212670.327836] [<ffffffff81015cb5>] do_softirq+0x65/0xa0
> [212670.327837] [<ffffffff8106e195>] irq_exit+0x85/0x90
> [212670.327845] [<ffffffff8155fd45>] do_IRQ+0x75/0xf0
> [212670.327848] [<ffffffff81013b13>] ret_from_intr+0x0/0x11
> [212670.327849] <EOI> [<ffffffff81038acb>] ? native_safe_halt+0xb/0x10
> [212670.327855] [<ffffffff8101b69d>] ? default_idle+0x3d/0x90
> [212670.327860] [<ffffffff81011e63>] ? cpu_idle+0xb3/0x110
> [212670.327867] [<ffffffff81552b53>] ? start_secondary+0xa8/0xaa
> [212670.327869] ---[ end trace e26694ca94def524 ]---
>
>
> Here's netstat -s output
>
> Ip:
> 362267935 total packets received
> 0 forwarded
> 0 incoming packets discarded
> 362257901 incoming packets delivered
> 326868094 requests sent out
> 9 fragments dropped after timeout
> 2777 reassemblies required
> 1357 packets reassembled ok
> 9 packet reassembles failed
> 490 fragments received ok
> 1034 fragments created
> Icmp:
> 22430 ICMP messages received
> 283 input ICMP message failed.
> ICMP input histogram:
> destination unreachable: 17113
> timeout in transit: 613
> redirects: 9
> echo requests: 4685
> echo replies: 10
> 7383 ICMP messages sent
> 0 ICMP messages failed
> ICMP output histogram:
> destination unreachable: 2695
> echo request: 11
> echo replies: 4677
> IcmpMsg:
> InType0: 10
> InType3: 17113
> InType5: 9
> InType8: 4685
> InType11: 613
> OutType0: 4677
> OutType3: 2695
> OutType8: 11
> Tcp:
> 6563076 active connections openings
> 1610183 passive connection openings
> 1646225 failed connection attempts
> 75246 connection resets received
> 1141 connections established
> 361192315 segments received
> 323797760 segments send out
> 1997456 segments retransmited
> 12990 bad segments received.
> 1851272 resets sent
> Udp:
> 4138313 packets received
> 186 packets to unknown port received.
> 0 packet receive errors
> 4161268 packets sent
> UdpLite:
> TcpExt:
> 5096 invalid SYN cookies received
> 167 resets received for embryonic SYN_RECV sockets
> 58826 packets pruned from receive queue because of socket buffer overrun
> 312 packets pruned from receive queue
> 19 packets dropped from out-of-order queue because of socket buffer overrun
> 365 ICMP packets dropped because they were out-of-window
> 2712111 TCP sockets finished time wait in fast timer
> 82068 time wait sockets recycled by time stamp
> 311 packets rejects in established connections because of timestamp
> 11516250 delayed acks sent
> 6415 delayed acks further delayed because of locked socket
> Quick ack mode was activated 208750 times
> 41789 packets directly queued to recvmsg prequeue.
> 1 bytes directly in process context from backlog
> 2969 bytes directly received in process context from prequeue
> 155660989 packet headers predicted
> 55448128 acknowledgments not containing data payload received
> 89389461 predicted acknowledgments
> 9544 times recovered from packet loss due to fast retransmit
> 585991 times recovered from packet loss by selective acknowledgements
> 710 bad SACK blocks received
> Detected reordering 1944 times using FACK
> Detected reordering 26599 times using SACK
> Detected reordering 267 times using reno fast retransmit
> Detected reordering 1819 times using time stamp
> 3169 congestion windows fully recovered without slow start
> 26810 congestion windows partially recovered using Hoe heuristic
> 14402 congestion windows recovered without slow start by DSACK
> 40392 congestion windows recovered without slow start after partial ack
> 115772 TCP data loss events
> TCPLostRetransmit: 5320
> 1922 timeouts after reno fast retransmit
> 69095 timeouts after SACK recovery
> 11101 timeouts in loss state
> 1151834 fast retransmits
> 74479 forward retransmits
> 225380 retransmits in slow start
> 275631 other TCP timeouts
> 2606 classic Reno fast retransmits failed
> 30507 SACK retransmits failed
> 4862645 packets collapsed in receive queue due to low socket buffer
> 260934 DSACKs sent for old packets
> 5109 DSACKs sent for out of order packets
> 95650 DSACKs received
> 819 DSACKs for out of order packets received
> 28142 connections reset due to unexpected data
> 22325 connections reset due to early user close
> 85423 connections aborted due to timeout
> TCPSACKDiscard: 2319
> TCPDSACKIgnoredOld: 52587
> TCPDSACKIgnoredNoUndo: 29859
> TCPSpuriousRTOs: 2605
> TCPSackShifted: 3539688
> TCPSackMerged: 3241543
> TCPSackShiftFallback: 8938458
> IpExt:
> InMcastPkts: 2105
> InBcastPkts: 12
> InOctets: 1670966745
> OutOctets: -417434189
> InMcastOctets: 58940
> InBcastOctets: 1792
^ permalink raw reply
* Re: [PATCH RESEND 1/3] netfilter: xtables: inclusion of xt_condition
From: Patrick McHardy @ 2010-09-22 6:46 UTC (permalink / raw)
To: Luciano Coelho
Cc: Jan Engelhardt, netfilter-devel@vger.kernel.org,
netdev@vger.kernel.org, sameo@linux.intel.com,
Ylalehto Janne (Nokia-MS/Tampere)
In-Reply-To: <1285099327.10579.20.camel@powerslave>
Am 21.09.2010 22:02, schrieb Luciano Coelho:
> On Thu, 2010-09-16 at 07:38 +0200, ext Patrick McHardy wrote:
>> On 15.09.2010 23:09, Jan Engelhardt wrote:
>>>
>>> On Wednesday 2010-09-15 22:59, Patrick McHardy wrote:
>>>> On 15.09.2010 22:52, Jan Engelhardt wrote:
>>>>>
>>>>> On Wednesday 2010-09-15 22:39, Patrick McHardy wrote:
>>>>>> Am 17.08.2010 10:36, schrieb Luciano Coelho:
>>>>>>> +/* Defaults, these can be overridden on the module command-line. */
>>>>>>> +static unsigned int condition_list_perms = S_IRUGO | S_IWUSR;
>>>>>>> +static unsigned int condition_uid_perms = 0;
>>>>>>> +static unsigned int condition_gid_perms = 0;
>>>>>>
>>>>>> I'm not sure whether we already discussed this, but this isn't
>>>>>> useful if namespaces are used since the IDs aren't global.
>>>>>
>>>>> Well it's also done for other xt modules that offer a procfs interface.
>>>>> It does not really cost much to have this present I'd say.
>>>>
>>>> They should simply set the permissions for the current namespace.
>>>>
>>> IIRC, the namespace stuff was going to be a later patch to keep
>>> early patches simpler.
>>
>> I'm fine with that as long as its done before merging the patches
>> upstream.
>
> I'll try to fix this and create a new patch on top of the existing ones,
> then I'll send them all as a single patchset.
Sounds good, thanks.
^ permalink raw reply
* Re: Seeing transmit timeouts on 8139cp
From: Philip Prindeville @ 2010-09-22 6:30 UTC (permalink / raw)
To: Francois Romieu; +Cc: Linux Netdev List
In-Reply-To: <20100917200024.GA7288@electric-eye.fr.zoreil.com>
On 9/17/10 1:00 PM, Francois Romieu wrote:
> Philip Prindeville<philipp_subx@redfish-solutions.com> :
> [...]
>> Does this look familiar to anyone?
> 349124a00754129a5f1e43efa84733e364bf3749 ?
>
> It would be a bit too easy.
>
Thanks. I'll give it a try now.
^ permalink raw reply
* Re: [PATCH] ip : take care of last fragment in ip_append_data
From: David Miller @ 2010-09-22 4:53 UTC (permalink / raw)
To: eric.dumazet; +Cc: nbowler, linux-kernel, netdev
In-Reply-To: <1285130646.6378.45.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 22 Sep 2010 06:44:06 +0200
> The "17" (instead of probable 16 need) comes from :
>
> net/ipv4/esp4.c line 599 :
>
> x->props.trailer_len = align + 1 + crypto_aead_authsize(esp->aead);
>
> In my Nick ipsec script case,
> crypto_aead_blocksize(aead) = 16,
> crypto_aead_authsize(esp->aead) = 0
>
> -> align = 16
> trailer_len = 16 + 1 + 0;
>
> I am not sure we need the "+ 1", but I know nothing about this stuff.
>
> Same in net/ipv6/esp6.c ?
I think the author of this code thought that the alignment was
expressed as "N - 1" instead of plain "N".
I'll do some research. :-)
Thanks Eric.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox