summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2011-05-20 19:37:58 +0000
committermikeb <mikeb@openbsd.org>2011-05-20 19:37:58 +0000
commit7a305577ffbdef198cf7c2de82835455ab9a135f (patch)
tree81c4c3c035acd9974c06a356d50901e68a783295
parentPass prompts through status_replace so that they can be more helpful (diff)
downloadwireguard-openbsd-7a305577ffbdef198cf7c2de82835455ab9a135f.tar.xz
wireguard-openbsd-7a305577ffbdef198cf7c2de82835455ab9a135f.zip
sr_scsi_cmd copes with failed i/o just fine so there's no need
to panic if we couldn't allocate memory for crypto descriptors; tested by dcoppa, ok marco
-rw-r--r--sys/dev/softraid_crypto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/softraid_crypto.c b/sys/dev/softraid_crypto.c
index f24f3d11cbe..4681d716a33 100644
--- a/sys/dev/softraid_crypto.c
+++ b/sys/dev/softraid_crypto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_crypto.c,v 1.65 2011/04/06 03:14:51 marco Exp $ */
+/* $OpenBSD: softraid_crypto.c,v 1.66 2011/05/20 19:37:58 mikeb Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Hans-Joerg Hoexer <hshoexer@openbsd.org>
@@ -1115,7 +1115,7 @@ sr_crypto_rw(struct sr_workunit *wu)
if (wu->swu_xs->flags & SCSI_DATA_OUT) {
crp = sr_crypto_getcryptop(wu, 1);
if (crp == NULL)
- panic("sr_crypto_rw: no crypto op");
+ return (1);
crp->crp_callback = sr_crypto_write;
crp->crp_opaque = wu;
s = splvm();