Re: [netfilter-core] [lkp] [netfilter] 68263ddb47: WARNING: CPU: 0 PID: 1225 at net/netfilter/nf_conntrack_seqadj.c:232 nf_ct_seq_offset+0x7a/0x9a

2016-09-16 Thread Florian Westphal
Gao Feng  wrote:
> > [   23.465616] [ cut here ]
> > [   23.466477] WARNING: CPU: 0 PID: 1225 at 
> > net/netfilter/nf_conntrack_seqadj.c:232
> > nf_ct_seq_offset+0x7a/0x9a
> > [   23.468458] Missing nfct_seqadj_ext_add() setup call
> >
> 
> It should be that nf_ct_add_synproxy failed and the seqadj extentision is
> not added.

Note that nfct_synproxy_ext_add always returns NULL if
CONFIG_NETFILTER_SYNPROXY=n

The warning should also be removed.

> When nf_ct_add_synproxy fails, the init_conntrack fails too and return
> ERR_PTR(-ENOMEM). In this case, the packet should be dropped directly, and
> should not be processed by the latter codes.

This means the commit breaks conntrack if SYNPROXY=n


[lkp] [netfilter] 68263ddb47: WARNING: CPU: 0 PID: 1225 at net/netfilter/nf_conntrack_seqadj.c:232 nf_ct_seq_offset+0x7a/0x9a

2016-09-16 Thread kernel test robot

FYI, we noticed the following commit:

https://github.com/0day-ci/linux 
fgao-ikuai8-com/netfilter-seqadj-Fix-some-possible-panics-of-seqadj-when-mem-is-exhausted/20160902-095727
commit 68263ddb4777cc996868498e3d56f616851966d2 ("netfilter: seqadj: Fix some 
possible panics of seqadj when mem is exhausted")

in testcase: boot

on test machine: qemu-system-x86_64 -enable-kvm -m 320M

caused below changes:


+--+++
|  | c73c248490 
| 68263ddb47 |
+--+++
| boot_successes   | 7  
| 0  |
| boot_failures| 7  
| 14 |
| BUG:kernel_reboot-without-warning_in_test_stage  | 7  
||
| WARNING:at_net/netfilter/nf_conntrack_seqadj.c:#nf_ct_seq_offset | 0  
| 14 |
| calltrace:SyS_connect| 0  
| 14 |
| calltrace:SyS_socketcall | 0  
| 14 |
| invoked_oom-killer:gfp_mask=0x   | 0  
| 1  |
| Mem-Info | 0  
| 1  |
+--+++



[   22.475640] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: 
RX
[   22.602089] Kernel tests: Boot OK!
[   23.465616] [ cut here ]
[   23.466477] WARNING: CPU: 0 PID: 1225 at 
net/netfilter/nf_conntrack_seqadj.c:232 nf_ct_seq_offset+0x7a/0x9a
[   23.468458] Missing nfct_seqadj_ext_add() setup call
[   23.469319] CPU: 0 PID: 1225 Comm: busybox Not tainted 
4.8.0-rc2-00241-g68263dd #1
[   23.470629] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 
Debian-1.8.2-1 04/01/2014
[   23.472138]   8ca4db58 8ca4db28 8a045c76 8ca4db44 89e4a2a3 00e8 
8a97c7b6
[   23.491476]  0001  0001 8ca4db60 89e4a2e7 0009  
8ca4db58
[   23.493027]  8b2c55b0 8ca4db74 8ca4db80 8a97c7b6 8b2c55da 00e8 8b2c55b0 
8e358000
[   23.494559] Call Trace:
[   23.495013]  [<8a045c76>] dump_stack+0x16/0x18
[   23.495777]  [<89e4a2a3>] __warn+0xaa/0xc1
[   23.496500]  [<8a97c7b6>] ? nf_ct_seq_offset+0x7a/0x9a
[   23.497392]  [<89e4a2e7>] warn_slowpath_fmt+0x2d/0x32
[   23.498270]  [<8a97c7b6>] nf_ct_seq_offset+0x7a/0x9a
[   23.499134]  [<8a97b2a3>] tcp_packet+0x63f/0xb93
[   23.499924]  [<89f39167>] ? cache_alloc_refill+0x203/0x80a
[   23.500896]  [<89e6863e>] ? preempt_count_sub+0x8f/0xd4
[   23.501824]  [<8a976d99>] ? nf_conntrack_in+0x2f9/0x53e
[   23.502747]  [<8a976dc2>] ? nf_conntrack_in+0x322/0x53e
[   23.521594]  [<89e6863e>] ? preempt_count_sub+0x8f/0xd4
[   23.522508]  [<8a976f5b>] nf_conntrack_in+0x4bb/0x53e
[   23.523399]  [<8a9e6a9a>] ipv4_conntrack_local+0x40/0x48
[   23.524338]  [<8a9729c5>] nf_iterate+0x3b/0x8e
[   23.525128]  [<8a972a5f>] nf_hook_slow+0x47/0xc7
[   23.525925]  [<8a9a47f1>] __ip_local_out+0xdb/0xea
[   23.526766]  [<8a9a3750>] ? ip_options_rcv_srr+0x30e/0x30e
[   23.527785]  [<8a9a4818>] ip_local_out+0x18/0x9e
[   23.528600]  [<8a9a4dd8>] ip_queue_xmit+0x395/0x41e
[   23.529469]  [<8a9b93cb>] tcp_transmit_skb+0x701/0x740
[   23.530420]  [<8a9bbcba>] tcp_connect+0x65a/0x6be
[   23.531247]  [<8a9bd9e3>] tcp_v4_connect+0x41d/0x45c
[   23.532115]  [<8a9d1a6c>] __inet_stream_connect+0x77/0x27e
[   23.533107]  [<89e6863e>] ? preempt_count_sub+0x8f/0xd4
[   23.534018]  [<89e4d8e1>] ? __local_bh_enable_ip+0xc4/0xea
[   23.534949]  [<8a9d1c9e>] inet_stream_connect+0x2b/0x3e
[   23.535862]  [<8a935255>] SyS_connect+0x77/0x9d
[   23.536662]  [<89f74959>] ? __fd_install+0x163/0x1c5
[   23.538079]  [<89e6863e>] ? preempt_count_sub+0x8f/0xd4





Thanks,
Xiaolong
#
# Automatically generated file; DO NOT EDIT.
# Linux/i386 4.8.0-rc2 Kernel Configuration
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf32-i386"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig"
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_MMU=y
CONFIG_ARCH_MMAP_RND_BITS_MIN=8
CONFIG_ARCH_MMAP_RND_BITS_MAX=16
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y