summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-10-26 14:14:56 +0000
committermav <mav@FreeBSD.org>2015-10-26 14:14:56 +0000
commit7da4fecded5533c3d274d91dd0053828f2a17f5f (patch)
treed33c7012a02c0fdc08a7f00ccf72f005be3a46b0 /sys/cam
parenta165c14ffd676d0e765cf43780f8e1182d152e3e (diff)
downloadFreeBSD-src-7da4fecded5533c3d274d91dd0053828f2a17f5f.zip
FreeBSD-src-7da4fecded5533c3d274d91dd0053828f2a17f5f.tar.gz
Don't try to replicate mode pages not present on this device.
MFC after: 3 days
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/ctl/ctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c
index 1013ae7..0d10721 100644
--- a/sys/cam/ctl/ctl.c
+++ b/sys/cam/ctl/ctl.c
@@ -927,6 +927,11 @@ ctl_isc_announce_mode(struct ctl_lun *lun, uint32_t initidx,
}
if (i == CTL_NUM_MODE_PAGES)
return;
+
+ /* Don't try to replicate pages not present on this device. */
+ if (lun->mode_pages.index[i].page_data == NULL)
+ return;
+
bzero(&msg.mode, sizeof(msg.mode));
msg.hdr.msg_type = CTL_MSG_MODE_SYNC;
msg.hdr.nexus.targ_port = initidx / CTL_MAX_INIT_PER_PORT;
OpenPOWER on IntegriCloud