diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-10-09 22:31:47 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-11 01:55:02 +0200 |
commit | 050f009e16f908932070313c1745d09dc69fd62b (patch) | |
tree | 2176b8034065bf2e8b401865efcfaab912bb1997 /net/ipv4/esp4.c | |
parent | [XFRM] user: Move attribute copying code into copy_to_user_state_extra (diff) | |
download | linux-050f009e16f908932070313c1745d09dc69fd62b.tar.xz linux-050f009e16f908932070313c1745d09dc69fd62b.zip |
[IPSEC]: Lock state when copying non-atomic fields to user-space
This patch adds locking so that when we're copying non-atomic fields such as
life-time or coaddr to user-space we don't get a partial result.
For af_key I've changed every instance of pfkey_xfrm_state2msg apart from
expiration notification to include the keys and life-times. This is in-line
with XFRM behaviour.
The actual cases affected are:
* pfkey_getspi: No change as we don't have any keys to copy.
* key_notify_sa:
+ ADD/UPD: This wouldn't work otherwise.
+ DEL: It can't hurt.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/esp4.c')
0 files changed, 0 insertions, 0 deletions