netdev
[Top] [All Lists]

[IPSEC] Lock policy in policy timer

To: "David S. Miller" <davem@xxxxxxxxxx>, netdev@xxxxxxxxxxx
Subject: [IPSEC] Lock policy in policy timer
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 22 May 2004 22:16:17 +1000
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.5.1+cvs20040105i
Hi Dave:

In light of the xfrm_state timer bug, I reviewed the policy timer as
well.  In doing so I found that the policy timer didn't take a lock
on the policy.

Although this won't lead to a panic, it does mean that a policy might
potentially take a long time to be freed.

So here is a patch to take a read_lock on the policy in the timer
so that it does not die on us.  Since the timer doesn't occur very
often, this shouldn't have much of an impact.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email:  Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Attachment: p
Description: Text document

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