summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-18 13:50:43 +0200
committerToomas Soome <tsoome@me.com>2019-02-25 22:43:02 +0200
commit8648b7db4afb6cc9a8e5b55e38e99c8c64b74e86 (patch)
tree64f552a08569b5cd98ac3739b0cd93c800a3cea9
parentc4b91d4b4753f33280a63b16f5116d23427088b1 (diff)
downloadillumos-joyent-8648b7db4afb6cc9a8e5b55e38e99c8c64b74e86.tar.gz
10435 dld: NULL pointer errors
Reviewed by: Aurélien Larcher <aurelien.larcher@gmail.com> Reviewed by: Andy Stormont <astormont@racktopsystems.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Joshua M. Clulow <josh@sysmgr.org>
-rw-r--r--usr/src/uts/common/io/dld/dld_proto.c2
-rw-r--r--usr/src/uts/common/io/dld/dld_str.c6
-rw-r--r--usr/src/uts/common/sys/dld_impl.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/usr/src/uts/common/io/dld/dld_proto.c b/usr/src/uts/common/io/dld/dld_proto.c
index 05989dccb2..cadd2a76d3 100644
--- a/usr/src/uts/common/io/dld/dld_proto.c
+++ b/usr/src/uts/common/io/dld/dld_proto.c
@@ -1267,7 +1267,7 @@ proto_unitdata_req(dld_str_t *dsp, mblk_t *mp)
* No lock can be held across modules and putnext()'s,
* which can happen here with the call from DLD_TX().
*/
- if (DLD_TX(dsp, bp, 0, 0) != NULL) {
+ if (DLD_TX(dsp, bp, 0, 0) != 0) {
/* flow-controlled */
DLD_SETQFULL(dsp);
}
diff --git a/usr/src/uts/common/io/dld/dld_str.c b/usr/src/uts/common/io/dld/dld_str.c
index 6042e69e59..8b9f87403f 100644
--- a/usr/src/uts/common/io/dld/dld_str.c
+++ b/usr/src/uts/common/io/dld/dld_str.c
@@ -884,7 +884,7 @@ str_mdata_fastpath_put(dld_str_t *dsp, mblk_t *mp, uintptr_t f_hint,
}
}
- if ((cookie = DLD_TX(dsp, mp, f_hint, flag)) != NULL) {
+ if ((cookie = DLD_TX(dsp, mp, f_hint, flag)) != 0) {
DLD_SETQFULL(dsp);
}
return (cookie);
@@ -892,7 +892,7 @@ str_mdata_fastpath_put(dld_str_t *dsp, mblk_t *mp, uintptr_t f_hint,
discard:
/* TODO: bump kstat? */
freemsg(mp);
- return (NULL);
+ return (0);
}
/*
@@ -985,7 +985,7 @@ str_mdata_raw_put(dld_str_t *dsp, mblk_t *mp)
}
}
- if (DLD_TX(dsp, mp, 0, 0) != NULL) {
+ if (DLD_TX(dsp, mp, 0, 0) != 0) {
/* Turn on flow-control for dld */
DLD_SETQFULL(dsp);
}
diff --git a/usr/src/uts/common/sys/dld_impl.h b/usr/src/uts/common/sys/dld_impl.h
index a76a927e59..035eea893a 100644
--- a/usr/src/uts/common/sys/dld_impl.h
+++ b/usr/src/uts/common/sys/dld_impl.h
@@ -328,7 +328,7 @@ typedef struct dld_ap {
\
mutex_enter(&(dsp)->ds_lock); \
if ((dsp)->ds_dlstate != DL_IDLE || \
- !mac_tx_is_flow_blocked((dsp)->ds_mch, NULL)) { \
+ !mac_tx_is_flow_blocked((dsp)->ds_mch, 0)) { \
if ((dsp)->ds_tx_flow_mp == NULL) \
(dsp)->ds_tx_flow_mp = getq(q); \
ASSERT((dsp)->ds_tx_flow_mp != NULL); \