From: Herbert Xu <[EMAIL PROTECTED]>
Date: Tue, 09 Oct 2007 22:36:36 +0800

> [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 <[EMAIL PROTECTED]>

Applied.

I would be more careful with the changelog description for
something like this in the future.  It sounds like this
patch will cause us to touch userspace with locks held,
which obviously only works in very limited scenerios
and is usually a BUG.

But you're actually just constructing SKB response netlink
bits, which later will be copied into userspace but long
after we've released these locks.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to