summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/io/hook.c
diff options
context:
space:
mode:
authorJason King <jason.king@joyent.com>2018-09-10 16:38:55 +0000
committerJason King <jason.king@joyent.com>2018-10-19 19:17:24 +0000
commit504b3e4c2ecff2fc5ce62559b4ba11c33e33027c (patch)
treef603e2a89fc8b972e92eb3dfb493067b04b966f2 /usr/src/uts/common/io/hook.c
parent104c53876a87e773ef729efa9419a70fe24933cb (diff)
downloadillumos-joyent-504b3e4c2ecff2fc5ce62559b4ba11c33e33027c.tar.gz
OS-6964 Cloud Firewall not affecting bhyve Instances
Reviewed by: Ryan Zezeski <rpz@joyent.com> Reviewed by: Patrick Mooney <patrick.mooney@joyent.com> Approved by: Patrick Mooney <patrick.mooney@joyent.com>
Diffstat (limited to 'usr/src/uts/common/io/hook.c')
-rw-r--r--usr/src/uts/common/io/hook.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr/src/uts/common/io/hook.c b/usr/src/uts/common/io/hook.c
index 2edbe752ce..b32da5a369 100644
--- a/usr/src/uts/common/io/hook.c
+++ b/usr/src/uts/common/io/hook.c
@@ -22,7 +22,7 @@
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
- * Copyright 2013 Joyent, Inc. All rights reserved.
+ * Copyright 2018 Joyent, Inc. All rights reserved.
* Copyright (c) 2016 by Delphix. All rights reserved.
*/
#include <sys/param.h>
@@ -1035,7 +1035,7 @@ hook_family_free(hook_family_int_t *hfi, hook_stack_t *hks)
/* Free container */
kmem_free(hfi, sizeof (*hfi));
- if (hks->hks_shutdown == 2)
+ if (hks != NULL && hks->hks_shutdown == 2)
hook_stack_remove(hks);
mutex_exit(&hook_stack_lock);
@@ -1126,7 +1126,7 @@ hook_family_copy(hook_family_t *src)
* Parameters: family(I) - family name string
*
* Search family list with family name
- * A lock on hfi_lock must be held when called.
+ * A lock on hfi_lock must be held when called.
*/
static hook_family_int_t *
hook_family_find(char *family, hook_stack_t *hks)
@@ -1651,7 +1651,7 @@ hook_event_copy(hook_event_t *src)
* event(I) - event name string
*
* Search event list with event name
- * A lock on hfi->hfi_lock must be held when called.
+ * A lock on hfi->hfi_lock must be held when called.
*/
static hook_event_int_t *
hook_event_find(hook_family_int_t *hfi, char *event)