summaryrefslogtreecommitdiffstats
path: root/sys/netipsec/key.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netipsec/key.c')
-rw-r--r--sys/netipsec/key.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c
index c1f7d4e..df87232 100644
--- a/sys/netipsec/key.c
+++ b/sys/netipsec/key.c
@@ -512,6 +512,18 @@ static struct mbuf *key_alloc_mbuf __P((int));
IPSEC_ASSERT((p)->refcnt > 0, ("SP refcnt underflow")); \
(p)->refcnt--; \
} while (0)
+
+
+/*
+ * Update the refcnt while holding the SPTREE lock.
+ */
+void
+key_addref(struct secpolicy *sp)
+{
+ SPTREE_LOCK();
+ SP_ADDREF(sp);
+ SPTREE_UNLOCK();
+}
/*
* Return 0 when there are known to be no SP's for the specified
OpenPOWER on IntegriCloud