From patchwork Wed Apr 9 21:11:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Micah Richert X-Patchwork-Id: 3958141 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BDD85BFF02 for ; Thu, 10 Apr 2014 01:09:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 03B1220639 for ; Thu, 10 Apr 2014 01:09:44 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2D4A420637 for ; Thu, 10 Apr 2014 01:09:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4B35B6E15A; Wed, 9 Apr 2014 18:09:42 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pb0-f44.google.com (mail-pb0-f44.google.com [209.85.160.44]) by gabe.freedesktop.org (Postfix) with ESMTP id C46FD6E13D for ; Wed, 9 Apr 2014 14:12:07 -0700 (PDT) Received: by mail-pb0-f44.google.com with SMTP id rp16so2998797pbb.31 for ; Wed, 09 Apr 2014 14:12:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KWdsCpdioXYDjRaqNKcmfrF/U5o7Y1OfWDCHWOP/16o=; b=N/ysDEdHKiGjD0A0t8qNPQrpV35VaD3TIV6A2vVwKPK8x8ouJHYyGTXo0TsNbhOoVI b0EMDKP7TVwOfIHFGEbhDIxetvRE4ahcBF16ril+T5hRrTOL8YGPkLkWrtvKXKSOATNR /TbObJR/dZl4bicTf5zCVEQTs2ViarWPw7fakhxSJ20buob0csfUO46WkkwSayjtjQlu eLRrku3EAOVZkFSd1yE6676HYQAcuNBdPPkuSCIwURB2ZF7A6u8Wnip9VjBBhz2UrgT5 GKFdTckrOhpWleWBVf//rV7axXpfalmx3FLdt/SPwWPkdt79jtgHiS6+uqwftNu8a03W py7g== X-Gm-Message-State: ALoCoQmcO78hs1j4DpGoTlafhswtfMctzqjxQUFwhBRffzje5Q1OPOXwXcrk1wqBvV/IHkjcOVPS X-Received: by 10.68.238.164 with SMTP id vl4mr14980017pbc.10.1397077926584; Wed, 09 Apr 2014 14:12:06 -0700 (PDT) Received: from localhost.localdomain (san-sbx-fw-01-outside.qualcomm.com. [199.106.99.36]) by mx.google.com with ESMTPSA id rk15sm9970853pab.37.2014.04.09.14.12.05 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Apr 2014 14:12:05 -0700 (PDT) From: Micah Richert To: dri-devel@lists.freedesktop.org Subject: [PATCH] fix memory leak Date: Wed, 9 Apr 2014 14:11:31 -0700 Message-Id: <1397077891-24443-1-git-send-email-richert@braincorporation.com> X-Mailer: git-send-email 1.8.3.2 X-Mailman-Approved-At: Wed, 09 Apr 2014 18:09:35 -0700 Cc: Micah Richert X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Micah Richert --- drivers/gpu/drm/msm/msm_gem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index 16f643a..885cf56 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -118,8 +118,10 @@ static void put_pages(struct drm_gem_object *obj) if (iommu_present(&platform_bus_type)) drm_gem_put_pages(obj, msm_obj->pages, true, false); - else + else { drm_mm_remove_node(msm_obj->vram_node); + drm_free_large(msm_obj->pages); + } msm_obj->pages = NULL; }