| To: | Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [IPSEC] add missing flow_cache_genid update to xfrm_policy_delete() |
| From: | Eugene Surovegin <ebs@xxxxxxxxxxx> |
| Date: | Thu, 5 Aug 2004 09:01:44 -0700 |
| Cc: | netdev@xxxxxxxxxxx |
| In-reply-to: | <E1BsgwG-0000O6-00@xxxxxxxxxxxxxxxxxxxxxxxx> |
| Mail-followup-to: | Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, netdev@xxxxxxxxxxx |
| References: | <20040805071459.GA31551@xxxxxxxxxxxxxxxx> <E1BsgwG-0000O6-00@xxxxxxxxxxxxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.5.5.1i |
On Thu, Aug 05, 2004 at 10:01:40PM +1000, Herbert Xu wrote:
> Please add a dir < XFRM_POLICY_MAX check before the atomic_inc so that
> dying sockets with policies don't blow away the flow cache.
Ohh, you're right :). Updated patch follows.
Signed-off-by: Eugene Surovegin<ebs@xxxxxxxxxxx>
===== net/xfrm/xfrm_policy.c 1.52 vs edited =====
--- 1.52/net/xfrm/xfrm_policy.c 2004-07-23 13:23:33 -07:00
+++ edited/net/xfrm/xfrm_policy.c 2004-08-05 08:58:22 -07:00
@@ -536,8 +536,11 @@
write_lock_bh(&xfrm_policy_lock);
pol = __xfrm_policy_unlink(pol, dir);
write_unlock_bh(&xfrm_policy_lock);
- if (pol)
+ if (pol){
+ if (dir < XFRM_POLICY_MAX)
+ atomic_inc(&flow_cache_genid);
xfrm_policy_kill(pol);
+ }
}
int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol)
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: ksoftirqd uses 99% CPU triggered by network traffic (maybe RLT-8139 related), OGAWA Hirofumi |
|---|---|
| Next by Date: | Re: SO_REUSEADDR behavior different from BSD, Michael T Kerrisk |
| Previous by Thread: | Re: [IPSEC] add missing flow_cache_genid update to xfrm_policy_delete(), Herbert Xu |
| Next by Thread: | Re: [IPSEC] add missing flow_cache_genid update to xfrm_policy_delete(), Herbert Xu |
| Indexes: | [Date] [Thread] [Top] [All Lists] |