Subject: Re: RFC: IPSEC patch 0 for netlink events

From: Patrick McHardy <[email-masked]>
Date: Mon, 28 Mar 2005 23:23:19 +0200

jamal wrote:

> @@ -478,6 +491,9 @@
>  
>  	if (x1->km.state == XFRM_STATE_ACQ) {
>  		__xfrm_state_insert(x);
> +		/* XXXX: We already have xfrm_state_lock
> +		 * do we need to grab x->lock as well? */
> +		xfrm_sa_notify(x, c, XFRM_SA_ADDED);

To answer this question: no. xfrm_state_lock can be nested in
x->lock, but not the other way around. If you want to avoid that
the state changes below you, you could notify before insertion.

Regards
Patrick