summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2010-07-02 15:49:25 +0000
committerkrw <krw@openbsd.org>2010-07-02 15:49:25 +0000
commiteebcfd8002e23824c350137eab57746a8df97e7a (patch)
treebf9a36da1102f43bb7f509aa6dfed538c48e171f
parentadd missing header needed by ioctl() (diff)
downloadwireguard-openbsd-eebcfd8002e23824c350137eab57746a8df97e7a.tar.xz
wireguard-openbsd-eebcfd8002e23824c350137eab57746a8df97e7a.zip
Don't timeout_add() when the referenced struct is about to be
discarded. It will eventually fire. Fortunately this file not yet being used. ok tedu@.
-rw-r--r--sys/dev/softraid_aoe.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/softraid_aoe.c b/sys/dev/softraid_aoe.c
index 431740771a3..5103b10996d 100644
--- a/sys/dev/softraid_aoe.c
+++ b/sys/dev/softraid_aoe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_aoe.c,v 1.16 2010/07/01 19:31:04 thib Exp $ */
+/* $OpenBSD: softraid_aoe.c,v 1.17 2010/07/02 15:49:25 krw Exp $ */
/*
* Copyright (c) 2008 Ted Unangst <tedu@openbsd.org>
* Copyright (c) 2008 Marco Peereboom <marco@openbsd.org>
@@ -382,7 +382,8 @@ sr_send_aoe_chunk(struct sr_workunit *wu, daddr64_t blk, int i)
IFQ_ENQUEUE(&ifp->if_snd, m, NULL, rv);
if ((ifp->if_flags & IFF_OACTIVE) == 0)
(*ifp->if_start)(ifp);
- timeout_add_sec(&ar->to, 10);
+ if (rv == 0)
+ timeout_add_sec(&ar->to, 10);
splx(s);
if (rv) {