Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jun 2017 17:23:20 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320415 - head/sys/kern
Message-ID:  <201706271723.v5RHNKbU025676@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Tue Jun 27 17:23:20 2017
New Revision: 320415
URL: https://svnweb.freebsd.org/changeset/base/320415

Log:
  Fix one more place uio_resid is truncated to int
  
  A follow-up to r231949 and r194990.
  
  Reported by:	pho@
  Reviewed by:	kib@, markj@
  Sponsored by:	Dell EMC Isilon
  Differential Revision:	https://reviews.freebsd.org/D11373

Modified:
  head/sys/kern/uipc_mbuf.c

Modified: head/sys/kern/uipc_mbuf.c
==============================================================================
--- head/sys/kern/uipc_mbuf.c	Tue Jun 27 17:22:03 2017	(r320414)
+++ head/sys/kern/uipc_mbuf.c	Tue Jun 27 17:23:20 2017	(r320415)
@@ -1517,7 +1517,7 @@ m_uiotombuf(struct uio *uio, int how, int len, int ali
 	 * the total data supplied by the uio.
 	 */
 	if (len > 0)
-		total = min(uio->uio_resid, len);
+		total = (uio->uio_resid < len) ? uio->uio_resid : len;
 	else
 		total = uio->uio_resid;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706271723.v5RHNKbU025676>