From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758046AbbBEPpn (ORCPT ); Thu, 5 Feb 2015 10:45:43 -0500 Received: from relay.smtp.cz ([81.95.97.115]:45356 "EHLO relay.smtp.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754041AbbBEPpl (ORCPT ); Thu, 5 Feb 2015 10:45:41 -0500 X-Greylist: delayed 521 seconds by postgrey-1.27 at vger.kernel.org; Thu, 05 Feb 2015 10:45:41 EST Date: Thu, 5 Feb 2015 16:36:50 +0100 From: Miroslav Urbanek To: Steffen Klassert Cc: Herbert Xu , "David S. Miller" , Netdev , Linux Kernel , Linus Torvalds , =?utf-8?B?VG9tw6HFoSBDaGFydsOhdA==?= , Jan Hejl Subject: [PATCH] flowcache: Fix kernel panic in flow_cache_flush_task Message-ID: <20150205153649.GA3278@miroslavurbanek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org flow_cache_flush_task references a structure member flow_cache_gc_work where it should reference flow_cache_flush_task instead. Kernel panic occurs on kernels using IPsec during XFRM garbage collection. The garbage collection interval can be shortened using the following sysctl settings: net.ipv4.xfrm4_gc_thresh=4 net.ipv6.xfrm6_gc_thresh=4 With the default settings, our productions servers crash approximately once a week. With the settings above, they crash immediately. Fixes: ca925cf1534e ("flowcache: Make flow cache name space aware") Reported-by: Tomáš Charvát Tested-by: Jan Hejl Signed-off-by: Miroslav Urbanek --- net/core/flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/flow.c b/net/core/flow.c index a0348fd..1033725 100644 --- a/net/core/flow.c +++ b/net/core/flow.c @@ -379,7 +379,7 @@ done: static void flow_cache_flush_task(struct work_struct *work) { struct netns_xfrm *xfrm = container_of(work, struct netns_xfrm, - flow_cache_gc_work); + flow_cache_flush_work); struct net *net = container_of(xfrm, struct net, xfrm); flow_cache_flush(net); -- 2.0.4