From owner-svn-src-head@freebsd.org Thu Dec 7 05:55:19 2017 Return-Path: Delivered-To: svn-src-head@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 BF17AE9E046; Thu, 7 Dec 2017 05:55:19 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 8B3DF779F7; Thu, 7 Dec 2017 05:55:19 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB75tIrW037077; Thu, 7 Dec 2017 05:55:18 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB75tIfM037076; Thu, 7 Dec 2017 05:55:18 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201712070555.vB75tIfM037076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Thu, 7 Dec 2017 05:55:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326655 - head/sys/geom/raid X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/sys/geom/raid X-SVN-Commit-Revision: 326655 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 05:55:19 -0000 Author: eugen Date: Thu Dec 7 05:55:18 2017 New Revision: 326655 URL: https://svnweb.freebsd.org/changeset/base/326655 Log: Fix use-after-free that sometimes results in a garbage returned instead of right error code after requests to SINGLE/CONCAT volumes, f.e: # dd if=/dev/raid/r0 bs=512 of=/dev/null dd: /dev/raid/r0: Unknown error: -559038242 Reviewed by: avg (mentor), mav (mentor) MFC after: 3 days Modified: head/sys/geom/raid/tr_concat.c Modified: head/sys/geom/raid/tr_concat.c ============================================================================== --- head/sys/geom/raid/tr_concat.c Thu Dec 7 04:55:31 2017 (r326654) +++ head/sys/geom/raid/tr_concat.c Thu Dec 7 05:55:18 2017 (r326655) @@ -341,7 +341,7 @@ g_raid_tr_iodone_concat(struct g_raid_tr_object *tr, pbp->bio_inbed++; if (pbp->bio_children == pbp->bio_inbed) { pbp->bio_completed = pbp->bio_length; - g_raid_iodone(pbp, bp->bio_error); + g_raid_iodone(pbp, pbp->bio_error); } }