From patchwork Sun Jan 25 10:52:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "yan.songming" X-Patchwork-Id: 43725 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B1A1521BCE for ; Sun, 25 Jan 2015 10:51:23 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id h11sf2003296wiw.1 for ; Sun, 25 Jan 2015 02:51:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=8vklA2zLA7qAbP701Zra2SnFxEa5ikuKC/MAHLGPWag=; b=g+3TpUxsmtcgdH9Tq7t5cwNtt0QOiHyzz8e8g2y6qfJdwcY/4Cfe+QC1+WGPN4dVNH HgiEp4x5zCnqu93bMRJi8mXwUuJNfEATZ837CXQAd8nUO4QbuuClLqQ9AkzwbWvNypLo LZGgPkmtOjonkbAseL4Ghrc5W0vPKMG2lOonKmEGBHSiBRBIMaw/V5fSCja0qVVf/9GE 4llkodvZyLZ7b0JcCkfG6M0lZY/Ed7AKVrxFDxEXpJQuIXxUpyZX+7+/HhRmmWR0a7hM ZVeU+eRSnW00F9i2tERrxUcgMvmHztqHiVhePhhEt4UsLnVy6Oxv6jwesXLVOxnTNxmt s/HQ== X-Gm-Message-State: ALoCoQkBDTPreg12HfaS317ebz8uzedBMsmaTo3hnSXzqfvtKWc62tOsukvaLFdqqqc9odJs8CPW X-Received: by 10.180.94.134 with SMTP id dc6mr1221614wib.2.1422183082994; Sun, 25 Jan 2015 02:51:22 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.26.200 with SMTP id n8ls401272lag.15.gmail; Sun, 25 Jan 2015 02:51:22 -0800 (PST) X-Received: by 10.152.6.37 with SMTP id x5mr2924644lax.44.1422183082838; Sun, 25 Jan 2015 02:51:22 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id jd8si6192851lbc.99.2015.01.25.02.51.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 25 Jan 2015 02:51:22 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id 10so3778366lbg.6 for ; Sun, 25 Jan 2015 02:51:22 -0800 (PST) X-Received: by 10.152.6.132 with SMTP id b4mr16266224laa.59.1422183082425; Sun, 25 Jan 2015 02:51:22 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp462234lbj; Sun, 25 Jan 2015 02:51:21 -0800 (PST) X-Received: by 10.224.90.5 with SMTP id g5mr1953655qam.24.1422183081218; Sun, 25 Jan 2015 02:51:21 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id 96si9085187qgi.114.2015.01.25.02.51.19 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 25 Jan 2015 02:51:21 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YFKmk-0006C2-Dc; Sun, 25 Jan 2015 10:51:18 +0000 Received: from mail-pd0-f180.google.com ([209.85.192.180]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YFKmf-00069e-1B for lng-odp@lists.linaro.org; Sun, 25 Jan 2015 10:51:13 +0000 Received: by mail-pd0-f180.google.com with SMTP id ft15so6553138pdb.11 for ; Sun, 25 Jan 2015 02:51:07 -0800 (PST) X-Received: by 10.70.135.137 with SMTP id ps9mr25870561pdb.135.1422183067581; Sun, 25 Jan 2015 02:51:07 -0800 (PST) Received: from ysm-linux.localdomain ([120.136.34.176]) by mx.google.com with ESMTPSA id da5sm4424780pdb.28.2015.01.25.02.51.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Jan 2015 02:51:06 -0800 (PST) From: Yan Songming To: lng-odp@lists.linaro.org Date: Sun, 25 Jan 2015 18:52:00 +0800 Message-Id: <1422183120-23233-1-git-send-email-yan.songming@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-Topics: patch Subject: [lng-odp] [PATCH v3 1/3] linux-generic: odp_shm_free:fix munmap error X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: yan.songming@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Yan Sonming Fix the bug of odp_shm_free. Signed-off-by: Yan Songming --- platform/linux-generic/odp_shared_memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/odp_shared_memory.c b/platform/linux-generic/odp_shared_memory.c index 99c5b40..2ce84b1 100644 --- a/platform/linux-generic/odp_shared_memory.c +++ b/platform/linux-generic/odp_shared_memory.c @@ -135,9 +135,9 @@ int odp_shm_free(odp_shm_t shm) shm_block = &odp_shm_tbl->block[i]; alloc_size = shm_block->size + shm_block->align; - ret = munmap(shm_block->addr, alloc_size); + ret = munmap(shm_block->addr_orig, alloc_size); if (0 != ret) { - ODP_DBG("odp_shm_free: munmap failed\n"); + ODP_DBG("odp_shm_free: munmap failed : %s\n", shm_block->name); odp_spinlock_unlock(&odp_shm_tbl->lock); return -1; }