From owner-svn-src-vendor@freebsd.org Sat Apr 15 17:43:42 2017 Return-Path: Delivered-To: svn-src-vendor@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 39AE9D3F31D; Sat, 15 Apr 2017 17:43:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id D33586C7; Sat, 15 Apr 2017 17:43:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id UAA13764; Sat, 15 Apr 2017 20:43:29 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1czRjN-000GqS-OH; Sat, 15 Apr 2017 20:43:29 +0300 Subject: Re: svn commit: r316930 - vendor-sys/illumos/dist/uts/common/fs/zfs To: Julian Elischer , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-vendor@FreeBSD.org References: <201704141843.v3EIhAA2079997@repo.freebsd.org> From: Andriy Gapon Message-ID: Date: Sat, 15 Apr 2017 20:42:33 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 17:43:42 -0000 On 15/04/2017 20:03, Julian Elischer wrote: > MFCs to 11 and 10 for all this stuff you've done? Come on, it's not even in head yet! Seriously, any help with that would be greatly appreciated. > On 15/4/17 2:43 am, Andriy Gapon wrote: >> Author: avg >> Date: Fri Apr 14 18:43:10 2017 >> New Revision: 316930 >> URL: https://svnweb.freebsd.org/changeset/base/316930 >> >> Log: >> 5814 bpobj_iterate_impl(): Close a refcount leak iterating on a sublist. >> illumos/illumos-gate@b67dde11a73a9455d641403cbbb65ec2add41b41 >> >> https://github.com/illumos/illumos-gate/commit/b67dde11a73a9455d641403cbbb65ec2add41b41 >> >> https://www.illumos.org/issues/5814 >> Lets pull in this patch from freebsd: >> http://svnweb.freebsd.org/base?view=revision&revision=271781 >> bpobj_iterate_impl(): Close a refcount leak iterating on a sublist. >> If bpobj_space() returned non-zero here, the sublist would have been >> left open, along with the bonus buffer hold it requires. This call >> does not invoke any calls to bpobj_close() itself. >> This bug doesn't have any known vector, but was found on inspection. >> MFC after: 1 week >> Sponsored by: Spectra Logic >> Affects: All ZFS versions starting 21 May 2010 (illumos cde58dbc) >> MFSpectraBSD: r1050998 on 2014/03/26 >> Fix bpobj_iterate_impl() to properly call bpobj_close() if bpobj_space() >> returns an error. >> Reviewed by: Prakash Surya >> Reviewed by: Matthew Ahrens >> Reviewed by: Paul Dagnelie >> Reviewed by: Simon Klinkert >> Approved by: Gordon Ross >> Author: Will Andrews >> >> Modified: >> vendor-sys/illumos/dist/uts/common/fs/zfs/bpobj.c >> >> Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/bpobj.c >> ============================================================================== >> --- vendor-sys/illumos/dist/uts/common/fs/zfs/bpobj.c Fri Apr 14 18:41:37 >> 2017 (r316929) >> +++ vendor-sys/illumos/dist/uts/common/fs/zfs/bpobj.c Fri Apr 14 18:43:10 >> 2017 (r316930) >> @@ -301,8 +301,10 @@ bpobj_iterate_impl(bpobj_t *bpo, bpobj_i >> if (free) { >> err = bpobj_space(&sublist, >> &used_before, &comp_before, &uncomp_before); >> - if (err) >> + if (err != 0) { >> + bpobj_close(&sublist); >> break; >> + } >> } >> err = bpobj_iterate_impl(&sublist, func, arg, tx, free); >> if (free) { >> >> > -- Andriy Gapon