Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

flowcache: Fix kernel panic in flow_cache_flush_task

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>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Miroslav Urbanek and committed by
David S. Miller
233c96fc 9d82f5eb

+1 -1
+1 -1
net/core/flow.c
··· 379 379 static void flow_cache_flush_task(struct work_struct *work) 380 380 { 381 381 struct netns_xfrm *xfrm = container_of(work, struct netns_xfrm, 382 - flow_cache_gc_work); 382 + flow_cache_flush_work); 383 383 struct net *net = container_of(xfrm, struct net, xfrm); 384 384 385 385 flow_cache_flush(net);