LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] flowcache: Fix kernel panic in flow_cache_flush_task
@ 2015-02-05 15:36 Miroslav Urbanek
  2015-02-05 16:44 ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: Miroslav Urbanek @ 2015-02-05 15:36 UTC (permalink / raw)
  To: Steffen Klassert
  Cc: Herbert Xu, David S. Miller, Netdev, Linux Kernel,
	Linus Torvalds, Tomáš Charvát, Jan Hejl

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 <tc@excello.cz>
Tested-by: Jan Hejl <jh@excello.cz>
Signed-off-by: Miroslav Urbanek <mu@miroslavurbanek.com>
---
 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] flowcache: Fix kernel panic in flow_cache_flush_task
  2015-02-05 15:36 [PATCH] flowcache: Fix kernel panic in flow_cache_flush_task Miroslav Urbanek
@ 2015-02-05 16:44 ` Eric Dumazet
  2015-02-05 22:39   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2015-02-05 16:44 UTC (permalink / raw)
  To: Miroslav Urbanek
  Cc: Steffen Klassert, Herbert Xu, David S. Miller, Netdev,
	Linux Kernel, Linus Torvalds, Tomáš Charvát,
	Jan Hejl, Fan Du

On Thu, 2015-02-05 at 16:36 +0100, Miroslav Urbanek wrote:
> 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 <tc@excello.cz>
> Tested-by: Jan Hejl <jh@excello.cz>
> Signed-off-by: Miroslav Urbanek <mu@miroslavurbanek.com>
> ---

Nice catch !

Ok, but you do not need to cc so many people/lists

netdev is fine, and we usually CC patch author, just in case.

Acked-by: Eric Dumazet <edumazet@google.com>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] flowcache: Fix kernel panic in flow_cache_flush_task
  2015-02-05 16:44 ` Eric Dumazet
@ 2015-02-05 22:39   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2015-02-05 22:39 UTC (permalink / raw)
  To: eric.dumazet
  Cc: mu, steffen.klassert, herbert, netdev, linux-kernel, torvalds,
	tc, jh, fan.du

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 05 Feb 2015 08:44:08 -0800

> On Thu, 2015-02-05 at 16:36 +0100, Miroslav Urbanek wrote:
>> 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 <tc@excello.cz>
>> Tested-by: Jan Hejl <jh@excello.cz>
>> Signed-off-by: Miroslav Urbanek <mu@miroslavurbanek.com>
>> ---
> 
> Nice catch !
> 
> Ok, but you do not need to cc so many people/lists
> 
> netdev is fine, and we usually CC patch author, just in case.
> 
> Acked-by: Eric Dumazet <edumazet@google.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-05 22:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-05 15:36 [PATCH] flowcache: Fix kernel panic in flow_cache_flush_task Miroslav Urbanek
2015-02-05 16:44 ` Eric Dumazet
2015-02-05 22:39   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).