summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-19 09:07:37 +0200
committerToomas Soome <tsoome@me.com>2019-04-10 09:20:41 +0300
commite59325b74ca0760391c4b4d3acd8d3294ffc521a (patch)
tree8ffeeecce7997369bda26ae340cb9eb6965fccc5
parent1f99504ab52e6927794513144ed20e8c0ba5ea6e (diff)
downloadillumos-joyent-e59325b74ca0760391c4b4d3acd8d3294ffc521a.tar.gz
10663 stmf_sbd: NULL pointer errors
Reviewed by: Andy Stormont <astormont@racktopsystems.com> Reviewed by: Gergő Doma <domag02@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd.c4
-rw-r--r--usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd_scsi.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd.c b/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd.c
index d2dca92dfc..2d1f443dda 100644
--- a/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd.c
+++ b/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd.c
@@ -888,7 +888,7 @@ sbd_load_section_hdr(sbd_lu_t *sl, sm_section_hdr_t *sms)
{
sm_section_hdr_t h;
uint64_t st;
- sbd_status_t ret;
+ sbd_status_t ret;
for (st = sl->sl_meta_offset + sizeof (sbd_meta_start_t);
st < sl->sl_meta_size_used; st += h.sms_size) {
@@ -3502,7 +3502,7 @@ sbd_update_zfs_prop(sbd_lu_t *sl)
num = (*dp) & 0xF;
*ah_meta++ = (num < 10) ? (num + '0') : (num + ('a' - 10));
}
- *ah_meta = NULL;
+ *ah_meta = '\0';
file = sbd_get_zvol_name(sl);
if (sbd_zvolset(file, (char *)ptr)) {
ret = SBD_META_CORRUPTED;
diff --git a/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd_scsi.c b/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd_scsi.c
index 0ca48aed9d..a2e6fe74fa 100644
--- a/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd_scsi.c
+++ b/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd_scsi.c
@@ -3392,8 +3392,8 @@ sbd_new_task(struct scsi_task *task, struct stmf_data_buf *initial_dbuf)
return;
/*
* } else if (cdb1 == SSVC_ACTION_READ_LONG_G4) {
- * sbd_handle_read(task, initial_dbuf);
- * return;
+ * sbd_handle_read(task, initial_dbuf);
+ * return;
*/
}
}
@@ -3402,7 +3402,7 @@ sbd_new_task(struct scsi_task *task, struct stmf_data_buf *initial_dbuf)
* if (cdb0 == SCMD_SVC_ACTION_OUT_G4) {
* if (cdb1 == SSVC_ACTION_WRITE_LONG_G4) {
* sbd_handle_write(task, initial_dbuf);
- * return;
+ * return;
* }
* }
*/
@@ -3703,7 +3703,7 @@ sbd_flush_data_cache(sbd_lu_t *sl, int fsync_done)
over_fsync:
if (((sl->sl_data_vtype == VCHR) || (sl->sl_data_vtype == VBLK)) &&
((sl->sl_flags & SL_NO_DATA_DKIOFLUSH) == 0)) {
- ret = VOP_IOCTL(sl->sl_data_vp, DKIOCFLUSHWRITECACHE, NULL,
+ ret = VOP_IOCTL(sl->sl_data_vp, DKIOCFLUSHWRITECACHE, 0,
FKIOCTL, kcred, &r, NULL);
if ((ret == ENOTTY) || (ret == ENOTSUP)) {
mutex_enter(&sl->sl_lock);