From: Fan Du <fan.du@windriver•com>
To: Steffen Klassert <steffen.klassert@secunet•com>
Cc: "Jakub Kiciński" <moorray3@wp•pl>,
"Eric Dumazet" <eric.dumazet@gmail•com>,
netdev@vger•kernel.org
Subject: Re: net-next: NULL pointer dereference on adding a net namespace and a system freeze
Date: Wed, 12 Mar 2014 18:02:23 +0800 [thread overview]
Message-ID: <532030AF.8010605@windriver.com> (raw)
In-Reply-To: <20140311120059.GB32371@secunet.com>
On 2014年03月11日 20:00, Steffen Klassert wrote:
> On Tue, Mar 11, 2014 at 01:46:49AM +0100, Jakub Kiciński wrote:
>> >
>> > I bisected the other issue to be caused/uncovered by:
>> >
>> > commit 1a1ccc96abb2ed9b8fbb71018e64b97324caef53
>> > Author: Steffen Klassert<steffen.klassert@secunet•com>
>> > Date: Wed Feb 19 10:07:34 2014 +0100
>> >
>> > xfrm: Remove caching of xfrm_policy_sk_bundles
>> >
>> > We currently cache socket policy bundles at xfrm_policy_sk_bundles.
>> > These cached bundles are never used. Instead we create and cache
>> > a new one whenever xfrm_lookup() is called on a socket policy.
>> >
>> > Most protocols cache the used routes to the socket, so let's
>> > remove the unused caching of socket policy bundles in xfrm.
>> >
>> > Signed-off-by: Steffen Klassert<steffen.klassert@secunet•com>
>> >
> This patch should affect only on the usage of IPsec socket policies.
> Do you use socket policies, or do you use IPsec at all?
>
>> >
>> > Machine freezes after FLOW_HASH_RND_PERIOD (default 10 minutes).
>> > Now get this warning during boot:
>> >
>> > [ 31.664820] ------------[ cut here ]------------
>> > [ 31.664824] WARNING: CPU: 2 PID: 3560 at /home/kuba/Development/Linux/net-next/lib/list_debug.c:33 __list_add+0xac/0xc0()
>> > [ 31.664826] list_add corruption. prev->next should be next (ffff880224579598), but was (null). (prev=ffff8802106140e8).
>> > [ 31.664827] Modules linked in: xt_CHECKSUM tun bridge stp llc ccm xt_conntrack iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw ftdi_sio arc4 rt2800pci rt2800mmio rt2800lib crc_ccitt eeprom_93cx6 rt2x00pci kvm_amd rt2x00mmio rt2x00lib mac80211 kvm snd_ca0106 cfg80211 e1000e snd_ac97_codec ac97_bus microcode serio_raw ptp i2c_piix4 k10temp acpi_cpufreq pps_core wmi r8169 mii rfkill nfsd auth_rpcgss nfs_acl lockd binfmt_misc sunrpc usb_storage radeon drm_kms_helper ttm
>> > [ 31.664855] CPU: 2 PID: 3560 Comm: (t-daemon) Not tainted 3.14.0-rc2-1a1ccc96abb2ed9b8fbb71018e64b97324caef53+ #11
>> > [ 31.664856] Hardware name: Gigabyte Technology Co., Ltd. GA-MA790XT-UD4P/GA-MA790XT-UD4P, BIOS F9b 08/17/2012
>> > [ 31.664857] 0000000000000009 ffff8802242e7c70 ffffffff81627878 ffff8802242e7cb8
>> > [ 31.664859] ffff8802242e7ca8 ffffffff8104a28d ffff880210610ea8 ffff880224579598
>> > [ 31.664861] ffff8802106140e8 ffff880224578000 0000000000000000 ffff8802242e7d08
>> > [ 31.664863] Call Trace:
>> > [ 31.664865] [<ffffffff81627878>] dump_stack+0x4d/0x66
>> > [ 31.664867] [<ffffffff8104a28d>] warn_slowpath_common+0x7d/0xa0
>> > [ 31.664869] [<ffffffff8104a2fc>] warn_slowpath_fmt+0x4c/0x50
>> > [ 31.664871] [<ffffffff812fdd8c>] __list_add+0xac/0xc0
>> > [ 31.664873] [<ffffffff81055d33>] __internal_add_timer+0x113/0x130
>> > [ 31.664875] [<ffffffff81055f47>] internal_add_timer+0x17/0x40
>> > [ 31.664876] [<ffffffff810587b2>] mod_timer+0x102/0x230
>> > [ 31.664878] [<ffffffff810588f8>] add_timer+0x18/0x20
>> > [ 31.664880] [<ffffffff81572204>] flow_cache_init+0x224/0x2b0
>> > [ 31.664882] [<ffffffff815f7247>] xfrm_net_init+0x227/0x360
>> > [ 31.664884] [<ffffffff815f7171>] ? xfrm_net_init+0x151/0x360
>> > [ 31.664886] [<ffffffff81553131>] ops_init+0x41/0x150
>> > [ 31.664888] [<ffffffff815532b3>] setup_net+0x73/0x110
>> > [ 31.664890] [<ffffffff815537f2>] copy_net_ns+0x72/0x100
>> > [ 31.664892] [<ffffffff81072619>] create_new_namespaces+0xf9/0x190
>> > [ 31.664894] [<ffffffff81072891>] unshare_nsproxy_namespaces+0x61/0xa0
>> > [ 31.664895] [<ffffffff81049949>] SyS_unshare+0x159/0x270
>> > [ 31.664897] [<ffffffff81638092>] system_call_fastpath+0x16/0x1b
>> >
> I was unable to reproduce this here, but it looks like the flowcache
> namespace changes are still not complete. We leak an active timer
> and all the allocated resources when we exit a namespace.
My bad! and embarrassing。。。
Thanks for the fix for my errors.
>
> Could you please try the patch below?
--
浮沉随浪只记今朝笑
--fan
prev parent reply other threads:[~2014-03-12 10:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 0:44 net-next: NULL pointer dereference on adding a net namespace and a system freeze Jakub Kicinski
2014-03-10 4:02 ` Eric Dumazet
2014-03-10 4:09 ` Eric Dumazet
2014-03-10 6:51 ` Fan Du
2014-03-10 13:44 ` Eric Dumazet
2014-03-10 14:09 ` [PATCH net-next] flowcache: restore a single flow_cache kmem_cache Eric Dumazet
2014-03-11 1:45 ` David Miller
2014-03-10 12:19 ` net-next: NULL pointer dereference on adding a net namespace and a system freeze Jakub Kiciński
2014-03-10 14:04 ` Eric Dumazet
2014-03-11 0:46 ` Jakub Kiciński
2014-03-11 5:30 ` Steffen Klassert
2014-03-11 12:00 ` Steffen Klassert
2014-03-11 12:40 ` Eric Dumazet
2014-03-11 13:20 ` Steffen Klassert
2014-03-11 14:30 ` Jakub Kiciński
2014-03-12 8:38 ` Steffen Klassert
2014-03-12 8:43 ` [PATCH net-next] flowcache: Fix resource leaks on namespace exit Steffen Klassert
2014-03-12 11:43 ` Eric Dumazet
2014-03-12 19:31 ` David Miller
2014-03-11 12:42 ` net-next: NULL pointer dereference on adding a net namespace and a system freeze Jakub Kiciński
2014-03-12 10:02 ` Fan Du [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=532030AF.8010605@windriver.com \
--to=fan.du@windriver$(echo .)com \
--cc=eric.dumazet@gmail$(echo .)com \
--cc=moorray3@wp$(echo .)pl \
--cc=netdev@vger$(echo .)kernel.org \
--cc=steffen.klassert@secunet$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox