diff options
| author | Olof Johansson <olof@lixom.net> | 2013-02-04 22:56:41 -0800 | 
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2013-02-04 22:56:41 -0800 | 
| commit | 469da62096e23adc755c1268b00b5fc7a214151b (patch) | |
| tree | fefd055fdae584e38d551f44d1339eb22cee4ed9 /net/xfrm | |
| parent | 4227961650884a06757f80877d5dce0bddc723d4 (diff) | |
| parent | 88b62b915b0b7e25870eb0604ed9a92ba4bfc9f7 (diff) | |
| download | olio-linux-3.10-469da62096e23adc755c1268b00b5fc7a214151b.tar.xz olio-linux-3.10-469da62096e23adc755c1268b00b5fc7a214151b.zip  | |
Merge tag 'v3.8-rc6' into next/soc
Linux 3.8-rc6
Diffstat (limited to 'net/xfrm')
| -rw-r--r-- | net/xfrm/xfrm_policy.c | 2 | ||||
| -rw-r--r-- | net/xfrm/xfrm_replay.c | 4 | 
2 files changed, 4 insertions, 2 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 41eabc46f11..07c585756d2 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -2656,7 +2656,7 @@ static void xfrm_policy_fini(struct net *net)  		WARN_ON(!hlist_empty(&net->xfrm.policy_inexact[dir]));  		htab = &net->xfrm.policy_bydst[dir]; -		sz = (htab->hmask + 1); +		sz = (htab->hmask + 1) * sizeof(struct hlist_head);  		WARN_ON(!hlist_empty(htab->table));  		xfrm_hash_free(htab->table, sz);  	} diff --git a/net/xfrm/xfrm_replay.c b/net/xfrm/xfrm_replay.c index 765f6fe951e..35754cc8a9e 100644 --- a/net/xfrm/xfrm_replay.c +++ b/net/xfrm/xfrm_replay.c @@ -242,11 +242,13 @@ static void xfrm_replay_advance_bmp(struct xfrm_state *x, __be32 net_seq)  	u32 diff;  	struct xfrm_replay_state_esn *replay_esn = x->replay_esn;  	u32 seq = ntohl(net_seq); -	u32 pos = (replay_esn->seq - 1) % replay_esn->replay_window; +	u32 pos;  	if (!replay_esn->replay_window)  		return; +	pos = (replay_esn->seq - 1) % replay_esn->replay_window; +  	if (seq > replay_esn->seq) {  		diff = seq - replay_esn->seq;  |