diff options
author | 2014-01-20 04:12:51 +0000 | |
---|---|---|
committer | 2014-01-20 04:12:51 +0000 | |
commit | e8cf5850e216fa518642a245a8897f012b66ad1b (patch) | |
tree | 5d263db0adf7f980e11c88fc6e4a2123d5f69205 | |
parent | Add strong stack protector mode for the original propolice in GCC3. (diff) | |
download | wireguard-openbsd-e8cf5850e216fa518642a245a8897f012b66ad1b.tar.xz wireguard-openbsd-e8cf5850e216fa518642a245a8897f012b66ad1b.zip |
Do not bother setting crp_desc to NULL, since it does not really gain us
anything.
ok mikeb@
-rw-r--r-- | sys/dev/softraid_crypto.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/dev/softraid_crypto.c b/sys/dev/softraid_crypto.c index 2662fc1c4e6..9518925088b 100644 --- a/sys/dev/softraid_crypto.c +++ b/sys/dev/softraid_crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_crypto.c,v 1.98 2013/12/21 20:46:20 guenther Exp $ */ +/* $OpenBSD: softraid_crypto.c,v 1.99 2014/01/20 04:12:51 jsing Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Hans-Joerg Hoexer <hshoexer@openbsd.org> @@ -332,9 +332,6 @@ sr_crypto_wu_get(struct sr_workunit *wu, int encrypt) return (crwu); unwind: - /* steal the descriptors back from the cryptop */ - crwu->cr_crp->crp_desc = NULL; - return (NULL); } @@ -348,9 +345,6 @@ sr_crypto_wu_put(struct sr_crypto_wu *crwu) DNPRINTF(SR_D_DIS, "%s: sr_crypto_wu_put crwu: %p\n", DEVNAME(wu->swu_dis->sd_sc), crwu); - /* steal the descriptors back from the cryptop */ - crp->crp_desc = NULL; - mtx_enter(&sd->mds.mdd_crypto.scr_mutex); TAILQ_INSERT_TAIL(&sd->mds.mdd_crypto.scr_wus, crwu, cr_link); mtx_leave(&sd->mds.mdd_crypto.scr_mutex); @@ -996,9 +990,7 @@ sr_crypto_alloc_resources(struct sr_discipline *sd) crwu->cr_crp = crypto_getreq(MAXPHYS >> DEV_BSHIFT); if (crwu->cr_crp == NULL) return (ENOMEM); - /* steal the list of cryptodescs */ crwu->cr_descs = crwu->cr_crp->crp_desc; - crwu->cr_crp->crp_desc = NULL; } bzero(&cri, sizeof(cri)); @@ -1067,7 +1059,6 @@ sr_crypto_free_resources(struct sr_discipline *sd) if (crwu->cr_dmabuf != NULL) dma_free(crwu->cr_dmabuf, MAXPHYS); if (crwu->cr_crp) { - /* twiddle cryptoreq back */ crwu->cr_crp->crp_desc = crwu->cr_descs; crypto_freereq(crwu->cr_crp); } |