commit | 4bda4f250d21c3e4f2a2da5f4cef829a434a4046 | [log] [tgz] |
---|---|---|
author | Pavel Emelyanov <xemul@openvz.org> | Fri Dec 14 11:38:04 2007 -0800 |
committer | David S. Miller <davem@davemloft.net> | Mon Jan 28 14:58:07 2008 -0800 |
tree | 2632bc368ceab622cf119ef5aee154617fe43f1c | |
parent | 5e41fb83216d370d158fe17675af82d12c6c72c9 [diff] |
[XFRM]: Fix potential race vs xfrm_state(only)_find and xfrm_hash_resize. The _find calls calculate the hash value using the xfrm_state_hmask, without the xfrm_state_lock. But the value of this mask can change in the _resize call under the state_lock, so we risk to fail in finding the desired entry in hash. I think, that the hash value is better to calculate under the state lock. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>