svn commit: r331420 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Andriy Gapon avg at FreeBSD.org
Fri Mar 23 09:42:48 UTC 2018


Author: avg
Date: Fri Mar 23 09:42:47 2018
New Revision: 331420
URL: https://svnweb.freebsd.org/changeset/base/331420

Log:
  zfs: fix mismatch between format specifier and type
  
  vdev_dbgmsg_print_tree printed vdev_id of uint64_t type with %u format
  specifier.  That caused subsequent parameters to be incorrectly read
  from the stack and lead to a crash when a wrong value was interpreted as
  a string pointer.
  
  This should be upstreamed.
  
  Reported by:	pho
  MFC after:	3 days

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c	Fri Mar 23 09:40:41 2018	(r331419)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c	Fri Mar 23 09:42:47 2018	(r331420)
@@ -237,7 +237,7 @@ vdev_dbgmsg_print_tree(vdev_t *vd, int indent)
 	}
 
 	zfs_dbgmsg("%*svdev %u: %s%s, guid: %llu, path: %s, %s", indent,
-	    "", vd->vdev_id, vd->vdev_ops->vdev_op_type,
+	    "", (int)vd->vdev_id, vd->vdev_ops->vdev_op_type,
 	    vd->vdev_islog ? " (log)" : "",
 	    (u_longlong_t)vd->vdev_guid,
 	    vd->vdev_path ? vd->vdev_path : "N/A", state);


More information about the svn-src-head mailing list