From owner-svn-src-head@FreeBSD.ORG Sun Aug 25 14:56:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 27A48971; Sun, 25 Aug 2013 14:56:15 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 14B3D21B3; Sun, 25 Aug 2013 14:56:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PEuEnD049984; Sun, 25 Aug 2013 14:56:14 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PEuEF1049983; Sun, 25 Aug 2013 14:56:14 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251456.r7PEuEF1049983@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 14:56:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254867 - head/sys/dev/drm2/ttm X-SVN-Group: head 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.14 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: Sun, 25 Aug 2013 14:56:15 -0000 Author: dumbbell Date: Sun Aug 25 14:56:14 2013 New Revision: 254867 URL: http://svnweb.freebsd.org/changeset/base/254867 Log: drm/ttm: Import Linux commit 014b34409fb2015f63663b6cafdf557fdf289628 Author: Dave Airlie Date: Wed Jan 16 15:58:34 2013 +1000 ttm: on move memory failure don't leave a node dangling if we have a move notify callback, when moving fails, we call move notify the opposite way around, however this ends up with *mem containing the mm_node from the bo, which means we double free it. This is a follow on to the previous fix. Reviewed-by: Jerome Glisse Signed-off-by: Dave Airlie Approved by: kib@ Modified: head/sys/dev/drm2/ttm/ttm_bo.c Modified: head/sys/dev/drm2/ttm/ttm_bo.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 14:55:08 2013 (r254866) +++ head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 14:56:14 2013 (r254867) @@ -475,6 +475,7 @@ static int ttm_bo_handle_move_mem(struct bo->mem = tmp_mem; bdev->driver->move_notify(bo, mem); bo->mem = *mem; + *mem = tmp_mem; } goto out_err;