summaryrefslogtreecommitdiffstats
path: root/sys/netipsec/xform_ipcomp.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2007-08-06 14:26:03 +0000
committerrwatson <rwatson@FreeBSD.org>2007-08-06 14:26:03 +0000
commit23574c86734ab5cb088584d30345e698cbbeaef2 (patch)
tree63e9e0c42ec5669b83e25b5f9cbdcbee7e1be6dc /sys/netipsec/xform_ipcomp.c
parent5f4b9d20fc4bf36bf86f78bb1622ee474a93dc56 (diff)
downloadFreeBSD-src-23574c86734ab5cb088584d30345e698cbbeaef2.zip
FreeBSD-src-23574c86734ab5cb088584d30345e698cbbeaef2.tar.gz
Remove the now-unused NET_{LOCK,UNLOCK,ASSERT}_GIANT() macros, which
previously conditionally acquired Giant based on debug.mpsafenet. As that has now been removed, they are no longer required. Removing them significantly simplifies error-handling in the socket layer, eliminated quite a bit of unwinding of locking in error cases. While here clean up the now unneeded opt_net.h, which previously was used for the NET_WITH_GIANT kernel option. Clean up some related gotos for consistency. Reviewed by: bz, csjp Tested by: kris Approved by: re (kensmith)
Diffstat (limited to 'sys/netipsec/xform_ipcomp.c')
-rw-r--r--sys/netipsec/xform_ipcomp.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/sys/netipsec/xform_ipcomp.c b/sys/netipsec/xform_ipcomp.c
index 6885584..142a731 100644
--- a/sys/netipsec/xform_ipcomp.c
+++ b/sys/netipsec/xform_ipcomp.c
@@ -219,8 +219,6 @@ ipcomp_input_cb(struct cryptop *crp)
u_int8_t nproto;
caddr_t addr;
- NET_LOCK_GIANT();
-
crd = crp->crp_desc;
tc = (struct tdb_crypto *) crp->crp_opaque;
@@ -252,7 +250,6 @@ ipcomp_input_cb(struct cryptop *crp)
if (crp->crp_etype == EAGAIN) {
KEY_FREESAV(&sav);
error = crypto_dispatch(crp);
- NET_UNLOCK_GIANT();
return error;
}
@@ -306,7 +303,6 @@ ipcomp_input_cb(struct cryptop *crp)
IPSEC_COMMON_INPUT_CB(m, sav, skip, protoff, NULL);
KEY_FREESAV(&sav);
- NET_UNLOCK_GIANT();
return error;
bad:
if (sav)
@@ -317,7 +313,6 @@ bad:
free(tc, M_XDATA);
if (crp)
crypto_freereq(crp);
- NET_UNLOCK_GIANT();
return error;
}
@@ -499,8 +494,6 @@ ipcomp_output_cb(struct cryptop *crp)
struct mbuf *m;
int error, skip, rlen;
- NET_LOCK_GIANT();
-
tc = (struct tdb_crypto *) crp->crp_opaque;
IPSEC_ASSERT(tc != NULL, ("null opaque data area!"));
m = (struct mbuf *) crp->crp_buf;
@@ -528,7 +521,6 @@ ipcomp_output_cb(struct cryptop *crp)
KEY_FREESAV(&sav);
IPSECREQUEST_UNLOCK(isr);
error = crypto_dispatch(crp);
- NET_UNLOCK_GIANT();
return error;
}
ipcompstat.ipcomps_noxform++;
@@ -582,7 +574,6 @@ ipcomp_output_cb(struct cryptop *crp)
error = ipsec_process_done(m, isr);
KEY_FREESAV(&sav);
IPSECREQUEST_UNLOCK(isr);
- NET_UNLOCK_GIANT();
return error;
bad:
if (sav)
@@ -592,7 +583,6 @@ bad:
m_freem(m);
free(tc, M_XDATA);
crypto_freereq(crp);
- NET_UNLOCK_GIANT();
return error;
}
OpenPOWER on IntegriCloud