Commit 07ec3d47 authored by Jim Harris's avatar Jim Harris
Browse files

scsi: don't zero entire vpd_ext_inquiry structure



This case was zeroing the entire structure - overwriting
the peripheral and page_code data already set.  Don't
bother zeroing the alloc_len either - we'll set that
later in this case statement.

Fixes issue #750.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I8b7c6f954b5e3c85ddfaf801d64dd4a501f50cd2

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450922


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 01103b2e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -399,8 +399,8 @@ bdev_scsi_inquiry(struct spdk_bdev *bdev, struct spdk_scsi_task *task,
		case SPDK_SPC_VPD_EXTENDED_INQUIRY_DATA: {
			struct spdk_scsi_vpd_ext_inquiry *vext = (struct spdk_scsi_vpd_ext_inquiry *)vpage;

			memset(vext, 0, sizeof(*vext));
			hlen = 4;
			memset((uint8_t *)vext + hlen, 0, sizeof(*vext) - hlen);

			/* RTO(3) GRD_CHK(2) APP_CHK(1) REF_CHK(0) */