From patchwork Fri Aug 3 22:05:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhilesh Kumar X-Patchwork-Id: 1416011 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id DCBC33FC71 for ; Thu, 6 Sep 2012 15:27:26 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T9dtu-0001JB-KO; Thu, 06 Sep 2012 15:21:52 +0000 Received: from mail-pb0-f49.google.com ([209.85.160.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SxQ01-0006jl-72 for linux-arm-kernel@lists.infradead.org; Fri, 03 Aug 2012 22:05:38 +0000 Received: by pbbrq13 with SMTP id rq13so2100339pbb.36 for ; Fri, 03 Aug 2012 15:05:34 -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:cc:content-type; bh=XSYEdFqpgQmenCt1zE3El8swlzwbpxk0UXGom2MwMw4=; b=uqnhB7780TNqBuRIiH3yeOYrwuD6Dq2Z5aKJeq9ZJWiSDl275/ouE2sxIpR4jiELFN w9b4ppn8PiHMenqgS7yPARXj6Y822n/+bSXrhuI644FgCceP+lsCO3aEXia0N6PuWY1v T2KbpxnLQ1tfIgEGgeyqZnUHMR2wbDME+d7pLhUuBft/JUJZGfIeoyRf4gx4vgusQzxq 1SadKjegFkBQU07kyAxDaiDAS4PHa6xGNczxESeQ8+6b+P0G5VCd/8/V3r2M8/Pvjs95 ImERIBu81BhFkhZsncpMMmX2tGVAKVUeYSgZtXbZCQf1I9hMxxcKs/Vtkwdg53I6ANlj h3JA== MIME-Version: 1.0 Received: by 10.68.238.68 with SMTP id vi4mr693509pbc.123.1344031534878; Fri, 03 Aug 2012 15:05:34 -0700 (PDT) Received: by 10.67.14.106 with HTTP; Fri, 3 Aug 2012 15:05:34 -0700 (PDT) Date: Sat, 4 Aug 2012 03:35:34 +0530 Message-ID: Subject: [Memory leak]: memory leak in sys_oabi_semtimedo From: Akhilesh Kumar To: linux@arm.linux.org.uk X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (akhilesh.lxr[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.49 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Mailman-Approved-At: Thu, 06 Sep 2012 10:43:55 -0400 Cc: serge.hallyn@canonical.com, ebiederm@xmission.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hi Russell, I found some memory leak arch/arm/kernel/sys_oabi-compat.c file please review below patch for main line and share ur comments, Thanks, Akhilesh From 86acd014680ae7127cb504387bee1824669a4744 Mon Sep 17 00:00:00 2001 From: Akhilesh Kumar Date: SAT, 4 Aug 2012 03:15:16 +0530 Subject: [Memory leak]: memory leak in sys_oabi_semtimedo if (err) { err = -EFAULT; } // return without free the memory Signed-off-by: Akhilesh Kumar --- arch/arm/kernel/sys_oabi-compat.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c index 3e94811..e34f953 100644 --- a/arch/arm/kernel/sys_oabi-compat.c +++ b/arch/arm/kernel/sys_oabi-compat.c @@ -329,6 +329,7 @@ asmlinkage long sys_oabi_semtimedop(int semid, timeout = &local_timeout; } if (err) { + kfree(sops); err = -EFAULT; } else { mm_segment_t fs = get_fs();