From: Herbert Xu Date: Tue, 9 Oct 2007 20:31:47 +0000 (-0700) Subject: [IPSEC]: Lock state when copying non-atomic fields to user-space X-Git-Tag: v2.6.24-rc1~1454^2~122 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=050f009e16f908932070313c1745d09dc69fd62b;p=pandora-kernel.git [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 Signed-off-by: David S. Miller --- Reading git-diff-tree failed