From owner-svn-src-all@freebsd.org Wed Jun 28 06:44:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1670BD99BA7; Wed, 28 Jun 2017 06:44:49 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D59D368BB6; Wed, 28 Jun 2017 06:44:48 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D173E260863; Wed, 28 Jun 2017 08:44:39 +0200 (CEST) Subject: Re: svn commit: r320415 - head/sys/kern To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201706271723.v5RHNKbU025676@repo.freebsd.org> From: Hans Petter Selasky Message-ID: Date: Wed, 28 Jun 2017 08:42:31 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <201706271723.v5RHNKbU025676@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 06:44:49 -0000 On 06/27/17 19:23, Conrad Meyer wrote: > 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 Hi, Should you use: sys/sys/param.h:#define MIN(a,b) (((a)<(b))?(a):(b)) Instead? --HPS > > 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; > > >