summaryrefslogtreecommitdiff
path: root/sys/net/if_aoe.h
diff options
context:
space:
mode:
authorBret Lambert <blambert@cvs.openbsd.org>2010-08-21 06:50:43 +0000
committerBret Lambert <blambert@cvs.openbsd.org>2010-08-21 06:50:43 +0000
commit9ac321b7c256e5da1096caaaa0bb9b8415910499 (patch)
tree5cbf4a37099c0f8386f62768438b5034f46e6b4d /sys/net/if_aoe.h
parentdfb648c37d8af19454f7f69dc851226717f30a74 (diff)
an unchecked-for failure of workq_add_task could lead to an mbuf leak
steal a page from dlg@ and embed a workq_task struct directly in the aoe_handler struct so that we won't fail when enqueueing a task while here, create real debugging printfs vice commenting out regular ones, and kill with fire the excessive number of includes ok marco@ tedu@
Diffstat (limited to 'sys/net/if_aoe.h')
-rw-r--r--sys/net/if_aoe.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if_aoe.h b/sys/net/if_aoe.h
index 79e0fe0eb52..d73ee016eea 100644
--- a/sys/net/if_aoe.h
+++ b/sys/net/if_aoe.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_aoe.h,v 1.1 2008/11/23 23:44:01 tedu Exp $ */
+/* $OpenBSD: if_aoe.h,v 1.2 2010/08/21 06:50:42 blambert Exp $ */
/*
* Copyright (c) 2007 Ted Unangst <tedu@openbsd.org>
*
@@ -15,6 +15,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/workq.h>
+#include <sys/timeout.h> /* for struct timeout */
struct aoe_packet {
#define AOE_F_ERROR (1 << 2)
@@ -103,6 +104,7 @@ struct aoe_handler {
unsigned char minor;
struct ifnet *ifp;
workq_fn fn;
+ struct workq_task task;
TAILQ_HEAD(, aoe_req) reqs;
};