netdev
[Top] [All Lists]

Re: RFC: IPSEC patch 0 for netlink events

To: hadi@xxxxxxxxxx
Subject: Re: RFC: IPSEC patch 0 for netlink events
From: Patrick McHardy <kaber@xxxxxxxxx>
Date: Mon, 28 Mar 2005 23:23:19 +0200
Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, Masahide NAKAMURA <nakam@xxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev <netdev@xxxxxxxxxxx>
In-reply-to: <1111950449.1089.938.camel@xxxxxxxxxxxxxxxx>
References: <1111864971.1092.904.camel@xxxxxxxxxxxxxxxx> <20050326194707.GA9872@xxxxxxxxxxxxxxxxxxx> <1111867875.1089.915.camel@xxxxxxxxxxxxxxxx> <20050327081848.GA13428@xxxxxxxxxxxxxxxxxxx> <1111950449.1089.938.camel@xxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.6) Gecko/20050324 Debian/1.7.6-1
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

<Prev in Thread] Current Thread [Next in Thread>