Revision a16a1647fa6b6783c2e91623e72e86f0c2adac5e authored by Pablo Neira Ayuso on 16 March 2012, 02:00:34 UTC, committed by David S. Miller on 17 March 2012, 08:47:08 UTC
Kerin Millar reported hardlockups while running `conntrackd -c'
in a busy firewall. That system (with several processors) was
acting as backup in a primary-backup setup.

After several tries, I found a race condition between the deletion
operation of ctnetlink and timeout expiration. This patch fixes
this problem.

Tested-by: Kerin Millar <kerframil@gmail.com>
Reported-by: Kerin Millar <kerframil@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c577923
Raw File
reciprocal_div.c
#include <asm/div64.h>
#include <linux/reciprocal_div.h>
#include <linux/export.h>

u32 reciprocal_value(u32 k)
{
	u64 val = (1LL << 32) + (k - 1);
	do_div(val, k);
	return (u32)val;
}
EXPORT_SYMBOL(reciprocal_value);
back to top