summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-20 13:41:23 +0200
committerToomas Soome <tsoome@me.com>2019-04-18 08:56:25 +0300
commit639c732ede1f837c0ccd952d813f5b85fc9e0abf (patch)
tree369729a82ca3f9f64dbef53a03465d6e4b78fa72
parent531d0b660fda0e50182e7d981c4eb2391f6528e2 (diff)
downloadillumos-joyent-639c732ede1f837c0ccd952d813f5b85fc9e0abf.tar.gz
10761 dls: NULL pointer errors
Reviewed by: Sebastian Wiedenroth <sebastian.wiedenroth@skylime.net> Reviewed by: Andy Stormont <astormont@racktopsystems.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/common/io/dls/dls_mgmt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr/src/uts/common/io/dls/dls_mgmt.c b/usr/src/uts/common/io/dls/dls_mgmt.c
index 9755aed43f..05620698ca 100644
--- a/usr/src/uts/common/io/dls/dls_mgmt.c
+++ b/usr/src/uts/common/io/dls/dls_mgmt.c
@@ -629,7 +629,7 @@ dls_devnet_prop_task(void *arg)
mutex_enter(&ddp->dd_mutex);
ddp->dd_prop_loaded = B_TRUE;
- ddp->dd_prop_taskid = NULL;
+ ddp->dd_prop_taskid = 0;
cv_broadcast(&ddp->dd_cv);
mutex_exit(&ddp->dd_mutex);
}
@@ -641,7 +641,7 @@ void
dls_devnet_prop_task_wait(dls_dl_handle_t ddp)
{
mutex_enter(&ddp->dd_mutex);
- while (ddp->dd_prop_taskid != NULL)
+ while (ddp->dd_prop_taskid != 0)
cv_wait(&ddp->dd_cv, &ddp->dd_mutex);
mutex_exit(&ddp->dd_mutex);
}
@@ -857,7 +857,7 @@ dls_devnet_set(const char *macname, datalink_id_t linkid, zoneid_t zoneid,
devnet_need_rebuild = B_TRUE;
stat_create = B_TRUE;
mutex_enter(&ddp->dd_mutex);
- if (!ddp->dd_prop_loaded && (ddp->dd_prop_taskid == NULL)) {
+ if (!ddp->dd_prop_loaded && (ddp->dd_prop_taskid == 0)) {
ddp->dd_prop_taskid = taskq_dispatch(system_taskq,
dls_devnet_prop_task, ddp, TQ_SLEEP);
}
@@ -920,7 +920,7 @@ dls_devnet_unset(const char *macname, datalink_id_t *id, boolean_t wait)
*/
ASSERT(ddp->dd_ref != 0);
if ((ddp->dd_ref != 1) || (!wait &&
- (ddp->dd_tref != 0 || ddp->dd_prop_taskid != NULL))) {
+ (ddp->dd_tref != 0 || ddp->dd_prop_taskid != 0))) {
mutex_exit(&ddp->dd_mutex);
rw_exit(&i_dls_devnet_lock);
return (EBUSY);
@@ -951,7 +951,7 @@ dls_devnet_unset(const char *macname, datalink_id_t *id, boolean_t wait)
/*
* Wait until all temporary references are released.
*/
- while ((ddp->dd_tref != 0) || (ddp->dd_prop_taskid != NULL))
+ while ((ddp->dd_tref != 0) || (ddp->dd_prop_taskid != 0))
cv_wait(&ddp->dd_cv, &ddp->dd_mutex);
} else {
ASSERT(ddp->dd_tref == 0 && ddp->dd_prop_taskid == NULL);