diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2000-06-14 14:09:37 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2000-06-14 14:09:37 +0000 |
commit | 921816fa8e62d22e4e6954a3f6584bb8977897b3 (patch) | |
tree | 27b3ff0934b994f0926679ba54260132a71cc0d2 /sys/dev | |
parent | 468d6bcbb13629cf9703cc73d5a09ca6bf6b2062 (diff) |
readd queue limiting code that was backed out yesterday. (ip_esp.c change
seems to have fixed this).
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/ubsec.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/pci/ubsec.c b/sys/dev/pci/ubsec.c index 84aeb28b1ad..8edabea5d28 100644 --- a/sys/dev/pci/ubsec.c +++ b/sys/dev/pci/ubsec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ubsec.c,v 1.11 2000/06/13 06:32:16 jason Exp $ */ +/* $OpenBSD: ubsec.c,v 1.12 2000/06/14 14:09:36 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; + struct ubsec_q *q = NULL; int card, err, i, j, s; struct ubsec_softc *sc; struct cryptodesc *crd1, *crd2, *maccrd, *enccrd; @@ -336,6 +336,14 @@ 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) { |