summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjason <jason@openbsd.org>2000-06-13 06:32:16 +0000
committerjason <jason@openbsd.org>2000-06-13 06:32:16 +0000
commit22ddec6ce43f4a08d5ea0f68c2da91f3c13ea393 (patch)
treef3c2d2d1463c2e6fbb64673d2bf276833fe7049c /sys
parentOops: initialize q to avoid using the unitialized value when the queue fills (diff)
downloadwireguard-openbsd-22ddec6ce43f4a08d5ea0f68c2da91f3c13ea393.tar.xz
wireguard-openbsd-22ddec6ce43f4a08d5ea0f68c2da91f3c13ea393.zip
backout previous 2 changes... causes panics down the line.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/ubsec.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/dev/pci/ubsec.c b/sys/dev/pci/ubsec.c
index bc438b6b71f..84aeb28b1ad 100644
--- a/sys/dev/pci/ubsec.c
+++ b/sys/dev/pci/ubsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsec.c,v 1.10 2000/06/13 06:11:13 jason Exp $ */
+/* $OpenBSD: ubsec.c,v 1.11 2000/06/13 06:32:16 jason Exp $ */
/*
* Copyright (c) 2000 Jason L. Wright (jason@thought.net)
@@ -318,7 +318,7 @@ int
ubsec_process(crp)
struct cryptop *crp;
{
- struct ubsec_q *q = NULL;
+ struct ubsec_q *q;
int card, err, i, j, s;
struct ubsec_softc *sc;
struct cryptodesc *crd1, *crd2, *maccrd, *enccrd;
@@ -336,14 +336,6 @@ ubsec_process(crp)
sc = ubsec_cd.cd_devs[card];
- s = splnet();
- if (sc->sc_nqueue == UBS_MAX_NQUEUE) {
- splx(s);
- err = ENOMEM;
- goto errout;
- }
- splx(s);
-
q = (struct ubsec_q *)malloc(sizeof(struct ubsec_q),
M_DEVBUF, M_NOWAIT);
if (q == NULL) {