From patchwork Tue Sep 4 21:40:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Peethambaran X-Patchwork-Id: 11173 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 341FD23F27 for ; Tue, 4 Sep 2012 21:40:54 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 41D70A192EC for ; Tue, 4 Sep 2012 21:40:02 +0000 (UTC) Received: by iafj25 with SMTP id j25so9158881iaf.11 for ; Tue, 04 Sep 2012 14:40:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :dkim-signature:mime-version:date:message-id:from:to:subject :x-beenthere:x-mailman-version:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:content-type :content-transfer-encoding:sender:errors-to:x-gm-message-state; bh=NViDB4+4rctcSdqkZsI1HQb54bla93vpAlYhMqGBMOQ=; b=oKBXuF9dk7Pui/rYFmf2gn8LTRnTaUn3Wa0nuUAM5gjLJjTbB0oooNl3MEOZHA3sE6 Ycq1VPa6TbirhMCi7s7fJOm+kJPTwqpDAt4EkIj0bGzhNXgYFyd6cyhvgMRRAgGFPqG+ V04/A6yQc10xbxRBSbCeIF0ga0ZUeoKrzRMjQJyuzIYU34IvzPqknx07m6td8ccviS6w cQHv42UstnzEdJUy6hXpbPqd75QVh1AAmGhc+hHpZSsSziQgWJdO6AK2R0HRqzO+mStU m4xDe4l4sj9+Qc8q8X1/E1fb/764OqvxnkL2ID9BiheK56h8BQt5C3fDAahXTBVDKAt5 Pmsg== Received: by 10.50.237.41 with SMTP id uz9mr15565157igc.43.1346794852927; Tue, 04 Sep 2012 14:40:52 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp215787igc; Tue, 4 Sep 2012 14:40:52 -0700 (PDT) Received: by 10.180.100.35 with SMTP id ev3mr33255031wib.7.1346794851075; Tue, 04 Sep 2012 14:40:51 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id d4si22531190wej.82.2012.09.04.14.40.48; Tue, 04 Sep 2012 14:40:51 -0700 (PDT) Received-SPF: neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) client-ip=91.189.95.16; Authentication-Results: mx.google.com; spf=neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) smtp.mail=linaro-mm-sig-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@gmail.com Received: from localhost ([127.0.0.1] helo=mombin.canonical.com) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1T90rX-0001Wa-2M; Tue, 04 Sep 2012 21:40:47 +0000 Received: from mail-bk0-f42.google.com ([209.85.214.42]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1T90rV-0001WU-QX for linaro-mm-sig@lists.linaro.org; Tue, 04 Sep 2012 21:40:45 +0000 Received: by bkcjm19 with SMTP id jm19so4883818bkc.1 for ; Tue, 04 Sep 2012 14:40:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=7UCEn4ljgsdJMH4/oh6b2ed8bRoHr88I9E7z8uJ1ExA=; b=ynicpqTSgcJ+vSh7R5G9qTTm8a/YsUaOEcMATIeOp21cPb4ti6GIx5UGbvWbnwuYGM N41yyAr/CPUN0XiF7nYkBsG6MqQZRIbfZV8VYtFnQ9qm2UhaH8OTFLg7Rup6QMslJur6 gqIW66xUUw3VbH4CRIv64/caWEQ0GuOFygm3CEcvP5OrEY00jX/JucBFuZavx5T7rcDh ynpZlS83aRL41JC4bOpCJagdVkjja3WM24CWg8IBUN0Mq5pZMbS9I5dmV2poEjYUkZ10 41X0HkiRf5fKSncPBGJWi2VvTpR/Fyw9oidpPp1Dwg+VCRmVmAM8Th6JLQSJfDnPcARb fYWg== MIME-Version: 1.0 Received: by 10.204.154.141 with SMTP id o13mr8533169bkw.72.1346794845403; Tue, 04 Sep 2012 14:40:45 -0700 (PDT) Received: by 10.204.169.199 with HTTP; Tue, 4 Sep 2012 14:40:45 -0700 (PDT) Date: Wed, 5 Sep 2012 03:10:45 +0530 Message-ID: From: Nishanth Peethambaran To: linaro-mm-sig@lists.linaro.org, Rebecca Zavin , Zhangfei Gao , Haojian Zhuang Subject: [Linaro-mm-sig] [PATCH 1/2] gpu: ion: Fix kmalloc leak in carveout heap X-BeenThere: linaro-mm-sig@lists.linaro.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Unified memory management interest group." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linaro-mm-sig-bounces@lists.linaro.org Errors-To: linaro-mm-sig-bounces@lists.linaro.org X-Gm-Message-State: ALoCoQlT+y4ol3vDhp+NR7dQ87h0I18um9erdisj6jkg6j/0VSUnx2V4Ea+Tew5f2AAjKmxIp0SA >From 78c843052f9438a848dd91334c6392b3b861bfa1 Mon Sep 17 00:00:00 2001 From: Nishanth Peethambaran Date: Wed, 5 Sep 2012 02:21:54 +0530 Subject: [PATCH 1/2] gpu: ion: Fix kmalloc leak in carveout heap In carveout_unmap_dma(), the sg_table is freed. Change-Id: I8c2372c01a3f4c9061a1756ac9b31e09cf3ab9ef Signed-off-by: Nishanth Peethambaran --- drivers/gpu/ion/ion_carveout_heap.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/ion/ion_carveout_heap.c b/drivers/gpu/ion/ion_carveout_heap.c index 5b6255b..f7608bc 100644 --- a/drivers/gpu/ion/ion_carveout_heap.c +++ b/drivers/gpu/ion/ion_carveout_heap.c @@ -107,6 +107,7 @@ void ion_carveout_heap_unmap_dma(struct ion_heap *heap, struct ion_buffer *buffer) { sg_free_table(buffer->sg_table); + kfree(buffer->sg_table); } void *ion_carveout_heap_map_kernel(struct ion_heap *heap,