Message ID | 1421936710-21648-1-git-send-email-petri.savolainen@linaro.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <patchwork-forward+bncBCGMJF6NVUCBB74QQSTAKGQE3X5GISA@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 19FB3240DB for <linaro@patches.linaro.org>; Thu, 22 Jan 2015 14:26:09 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id u10sf1216041lbd.3 for <linaro@patches.linaro.org>; Thu, 22 Jan 2015 06:26:08 -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=a3nvpir6Hj0Kza+lhiJjTWcWmp0Ijjqd5qWfNIkyXwg=; b=LPM+kHBSCj6VnIQ/kvariSKrXQ5YL4KBYyR93M93IOrFtHQgIMu7jDJ3fL3BzF/1GW 0PmdI+y64lNYaseFyuWUZbE52vdVg44nrbMdfi5eexTv7D/60m71qFDLCaVSSrBAJ8K0 fh6rgYZHIN8E5dhaHYfBKcjxT4UAh9IW/nlGBwl7vCcz94NvDCAvqREXosvRkM/3+jHs VVXvhkyHHtE62G2smo72ZB5TiWGrDJ5fitDacKjPJJfus8VbSAlDlu3OVXimr0YdHAgz bEK7RDeduZvs8wyTmrIxnYoU+jn0syV4C5MVzktgKsVXDNOnrptXikPJmUQS4nbOv4ak V8Ag== X-Gm-Message-State: ALoCoQmH66cMbiD+r+7DA/bWzlEOx9BN3jNCJN8ISzgypc0niD+2tyDszsa1VgF8Cr29c2t4DC/Y X-Received: by 10.112.114.162 with SMTP id jh2mr280262lbb.9.1421936767953; Thu, 22 Jan 2015 06:26:07 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.206.70 with SMTP id lm6ls172777lac.41.gmail; Thu, 22 Jan 2015 06:26:07 -0800 (PST) X-Received: by 10.112.44.230 with SMTP id h6mr1862668lbm.98.1421936767809; Thu, 22 Jan 2015 06:26:07 -0800 (PST) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id lc9si22249884lac.54.2015.01.22.06.26.07 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 06:26:07 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by mail-lb0-f177.google.com with SMTP id p9so1787629lbv.8 for <patchwork-forward@linaro.org>; Thu, 22 Jan 2015 06:26:07 -0800 (PST) X-Received: by 10.152.5.226 with SMTP id v2mr1930949lav.34.1421936767675; Thu, 22 Jan 2015 06:26:07 -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.9.200 with SMTP id c8csp279448lbb; Thu, 22 Jan 2015 06:26:06 -0800 (PST) X-Received: by 10.224.136.7 with SMTP id p7mr2797140qat.65.1421936766186; Thu, 22 Jan 2015 06:26:06 -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 q16si9057847qam.36.2015.01.22.06.26.04 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 22 Jan 2015 06:26:06 -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 <lng-odp-bounces@lists.linaro.org>) id 1YEIhu-0003hq-6u; Thu, 22 Jan 2015 14:26:02 +0000 Received: from mail-qc0-f182.google.com ([209.85.216.182]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from <petri.savolainen@linaro.org>) id 1YEIho-0003ct-7W for lng-odp@lists.linaro.org; Thu, 22 Jan 2015 14:25:56 +0000 Received: by mail-qc0-f182.google.com with SMTP id l6so1379917qcy.13 for <lng-odp@lists.linaro.org>; Thu, 22 Jan 2015 06:25:51 -0800 (PST) X-Received: by 10.229.197.129 with SMTP id ek1mr3052412qcb.8.1421936751003; Thu, 22 Jan 2015 06:25:51 -0800 (PST) Received: from mcpro03.emea.nsn-net.net (ec2-23-23-178-99.compute-1.amazonaws.com. [23.23.178.99]) by mx.google.com with ESMTPSA id s9sm6460892qam.43.2015.01.22.06.25.48 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 Jan 2015 06:25:49 -0800 (PST) From: Petri Savolainen <petri.savolainen@linaro.org> To: lng-odp@lists.linaro.org Date: Thu, 22 Jan 2015 16:25:09 +0200 Message-Id: <1421936710-21648-1-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.2.2 X-Topics: patch Subject: [lng-odp] [PATCH 1/2] linux-generic: shm: odp_shm_free bug fix X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <http://lists.linaro.org/mailman/listinfo/lng-odp>, <mailto:lng-odp-request@lists.linaro.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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: petri.savolainen@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.177 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 |
diff --git a/platform/linux-generic/odp_shared_memory.c b/platform/linux-generic/odp_shared_memory.c index 99c5b40..7d54f09 100644 --- a/platform/linux-generic/odp_shared_memory.c +++ b/platform/linux-generic/odp_shared_memory.c @@ -135,7 +135,7 @@ 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_spinlock_unlock(&odp_shm_tbl->lock);
Free should use the original address from mmap() and not the align adjusted address. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> --- platform/linux-generic/odp_shared_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)