changeset 10005:b6940fb2404d

6679330 fp needs to reset the sysmbolic port name buffer before storing it into userland.
author bing hu - Sun Microsystems - Beijing China <Bing.Hu@Sun.COM>
date Wed, 01 Jul 2009 13:24:50 +0800
parents 474324f166a9
children 54ed6e960d71
files usr/src/uts/common/io/fibre-channel/impl/fp.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/io/fibre-channel/impl/fp.c	Tue Jun 30 16:17:37 2009 -0700
+++ b/usr/src/uts/common/io/fibre-channel/impl/fp.c	Wed Jul 01 13:24:50 2009 +0800
@@ -7338,7 +7338,7 @@
 		    val->ModelDescription,
 		    sizeof (val->ModelDescription));
 		bcopy(port->fp_sym_node_name, val->NodeSymbolicName,
-		    sizeof (val->NodeSymbolicName));
+		    port->fp_sym_node_namelen);
 		bcopy(port->fp_hba_port_attrs.hardware_version,
 		    val->HardwareVersion,
 		    sizeof (val->HardwareVersion));
@@ -7753,7 +7753,7 @@
 		bcopy(port->fp_fc4_types, val->PortActiveFc4Types,
 		    sizeof (val->PortActiveFc4Types));
 		bcopy(port->fp_sym_port_name, val->PortSymbolicName,
-		    sizeof (val->PortSymbolicName));
+		    port->fp_sym_port_namelen);
 		val->PortSupportedSpeed =
 		    port->fp_hba_port_attrs.supported_speed;
 
@@ -7897,7 +7897,7 @@
 			    sizeof (val->NodeWWN.raw_wwn));
 			val->PortFcId = tmp_pd->pd_port_id.port_id;
 			bcopy(tmp_pd->pd_spn, val->PortSymbolicName,
-			    sizeof (val->PortSymbolicName));
+			    tmp_pd->pd_spn_len);
 			val->PortSupportedClassofService = tmp_pd->pd_cos;
 			/*
 			 * we will assume the sizeof these pd_fc4types and
@@ -8029,7 +8029,7 @@
 			    sizeof (val->NodeWWN.raw_wwn));
 			val->PortFcId = tmp_pd->pd_port_id.port_id;
 			bcopy(tmp_pd->pd_spn, val->PortSymbolicName,
-			    sizeof (val->PortSymbolicName));
+			    tmp_pd->pd_spn_len);
 			val->PortSupportedClassofService = tmp_pd->pd_cos;
 			val->PortType = FC_HBA_PORTTYPE_UNKNOWN;
 			val->PortState =