From patchwork Sat Feb 9 18:12:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Peethambaran X-Patchwork-Id: 14712 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 D1C2A23DEA for ; Sat, 9 Feb 2013 18:12:25 +0000 (UTC) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by fiordland.canonical.com (Postfix) with ESMTP id 6C6EEA196FA for ; Sat, 9 Feb 2013 18:12:25 +0000 (UTC) Received: by mail-vc0-f177.google.com with SMTP id m18so3012157vcm.8 for ; Sat, 09 Feb 2013 10:12:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:dkim-signature:mime-version:x-received: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=ed6fN+tZGU+YJ+FIVnCruuXQLc3NlzFlMRzfgEiqUDs=; b=QWVFBc3hQIeszhGMvASaPPhvgaNCjMeyCRJe7JsTHN0POt06bWP2JcIsCI1lcxYHXg H5tsChTujVfSShXamQMHZnIZgiC/+gVLhu03RaePCVyghOxmQZf3MWdTgmcFpohyc/67 lcor9mI1F2OuDbShdM7R8VMXuJ3B/wc5VN/RoeNK6a/3y2VEessa2nOg+Khlrqz0BTYA RiC4OtJR+8bRQKE7EARe4nU3uAPPAN460VgL4oS2FXJW9y4LCpnmLymRGu88M3sndcym qnIvDdVg0tSrAScli8QEl5PyfQGgsTKhumKkR9m1dT3JvZi9nfyHMs+ZlIpsTxcGw7Jk GTcQ== X-Received: by 10.52.27.50 with SMTP id q18mr10729028vdg.20.1360433544937; Sat, 09 Feb 2013 10:12:24 -0800 (PST) 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.58.252.8 with SMTP id zo8csp21413vec; Sat, 9 Feb 2013 10:12:24 -0800 (PST) X-Received: by 10.14.194.4 with SMTP id l4mr30193253een.12.1360433543890; Sat, 09 Feb 2013 10:12:23 -0800 (PST) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id r43si60263133eeo.63.2013.02.09.10.12.23; Sat, 09 Feb 2013 10:12:23 -0800 (PST) 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 1U4EuR-0007HT-EJ; Sat, 09 Feb 2013 18:12:19 +0000 Received: from mail-la0-f54.google.com ([209.85.215.54]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1U4EuQ-0007HO-3Q for linaro-mm-sig@lists.linaro.org; Sat, 09 Feb 2013 18:12:18 +0000 Received: by mail-la0-f54.google.com with SMTP id gw10so4780794lab.27 for ; Sat, 09 Feb 2013 10:12:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=h/qLMYQHRG60qlqEsHxDUxjgI9VFk1HwHzm/79fs4vA=; b=TlRv4zUOs6haLY9rqEGIJQy1i0upv/W5Jly5jumHEEw5goou+YAqpvs/jdt0TLL5uz NOgnDLZgI9mkxFEu1gV3m1KM+TGFhenN59yiVQ4v1dNxkKU8rgqLtP0ipKmN+sS8dzb6 nzHPo/IG4En2C7Nq56XmwwVTbS+5hJWj3uoxKdzE+qYYXlHvAm3Bzlqg28d2ZXT48Qhm +m7v+W5wLJfGSj3BOUqeYQxB49Q92sLYTi72K8N54nFfD6W7+fzCQQ5qonPf5+DIzXsr bOjvSk81njkQAAH+PqthtDoqcGBHS+AXbANMK7I8fmW8VgH9z6KbFHbqwXHyPglnhazC bP1w== MIME-Version: 1.0 X-Received: by 10.152.144.71 with SMTP id sk7mr8320884lab.29.1360433537463; Sat, 09 Feb 2013 10:12:17 -0800 (PST) Received: by 10.112.104.72 with HTTP; Sat, 9 Feb 2013 10:12:17 -0800 (PST) Date: Sat, 9 Feb 2013 23:42:17 +0530 Message-ID: From: Nishanth Peethambaran To: linaro-mm-sig@lists.linaro.org, Rebecca Schultz Zavin Subject: [Linaro-mm-sig] [PATCH] gpu: ion: Fix a 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: ALoCoQnAuNThtCvzDhsZ4Dlb0A+A77SeAWihsJW7mW8FPnNeXPfU8TFCO7AdhbsFXD2AGl4LCkIu Free the sg_table allocated. Signed-off-by: Nishanth Peethambaran --- drivers/gpu/ion/ion_carveout_heap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/ion/ion_carveout_heap.c b/drivers/gpu/ion/ion_carveout_heap.c index ce8d311..e8164a6 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,