Message ID | 1427109356-16388-1-git-send-email-maxim.uvarov@linaro.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <patchwork-forward+bncBDX25FHYWQNBBBPMX6UAKGQEZ7Y4KDQ@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 80E2A214B0 for <linaro@patches.linaro.org>; Mon, 23 Mar 2015 11:16:22 +0000 (UTC) Received: by wivz2 with SMTP id z2sf7017741wiv.1 for <linaro@patches.linaro.org>; Mon, 23 Mar 2015 04:16:21 -0700 (PDT) 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=43eyu3tebSgFKEtf1NF2nhyxN00OZEvXapGx5pGExtc=; b=euxZsfQrkeOEIS41GMvgqGvCjTbCck8rP1PYZyDqFDEK1hTg7VQD7vMQgJvwEtKT/i Zf7RALyRPYro0Q1JNmqlW7FAKPzRy3DmFgSN9Vldh0HecjEQcfkrYeGRt8vBS57XQNlS 0fqXV0jN23zp1sy5hCrvomPj9VZtLCnIR8JZrooUnzc0nkVazCQeXdF/hOgDQcKNGEZ8 9kPv2E2Y/a+TpiQyggZis7qgjMEyp0+i1RXZRGBhNY9LIedgCuhOSD6tPot2hVzWUg+P uepEyPdCjXGjAZtgrySNQJOWHHUULLjUGXD7afP3B94ozPkbgooIqeTQMjBxgHzTqPpR 7Zww== X-Gm-Message-State: ALoCoQlAIb8WsvpqzgSvLrjH3VhgWWtn+ANVQaULo9HfHp+nrvxyLuyBRJ53ymLOEIWHlTHu14XZ X-Received: by 10.152.19.67 with SMTP id c3mr14139447lae.7.1427109381739; Mon, 23 Mar 2015 04:16:21 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.25.193 with SMTP id e1ls674495lag.80.gmail; Mon, 23 Mar 2015 04:16:21 -0700 (PDT) X-Received: by 10.152.203.134 with SMTP id kq6mr63881873lac.110.1427109381592; Mon, 23 Mar 2015 04:16:21 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id lu7si344340lbb.124.2015.03.23.04.16.21 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Mar 2015 04:16:21 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by labto5 with SMTP id to5so23482363lab.0 for <patchwork-forward@linaro.org>; Mon, 23 Mar 2015 04:16:21 -0700 (PDT) X-Received: by 10.112.218.5 with SMTP id pc5mr7911624lbc.32.1427109381426; Mon, 23 Mar 2015 04:16:21 -0700 (PDT) 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.57.201 with SMTP id k9csp756754lbq; Mon, 23 Mar 2015 04:16:20 -0700 (PDT) X-Received: by 10.140.148.195 with SMTP id 186mr117156979qhu.60.1427109380184; Mon, 23 Mar 2015 04:16:20 -0700 (PDT) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id z31si424139qkg.9.2015.03.23.04.16.18 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 23 Mar 2015 04:16:20 -0700 (PDT) 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 1Ya0L9-0005om-2v; Mon, 23 Mar 2015 11:16:15 +0000 Received: from mail-lb0-f173.google.com ([209.85.217.173]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from <maxim.uvarov@linaro.org>) id 1Ya0L2-0005oe-Uy for lng-odp@lists.linaro.org; Mon, 23 Mar 2015 11:16:09 +0000 Received: by lbbsy1 with SMTP id sy1so115775016lbb.1 for <lng-odp@lists.linaro.org>; Mon, 23 Mar 2015 04:16:02 -0700 (PDT) X-Received: by 10.112.155.65 with SMTP id vu1mr54104941lbb.61.1427109362523; Mon, 23 Mar 2015 04:16:02 -0700 (PDT) Received: from localhost.localdomain (ppp91-76-169-66.pppoe.mtu-net.ru. [91.76.169.66]) by mx.google.com with ESMTPSA id zz3sm122525lbb.5.2015.03.23.04.16.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Mar 2015 04:16:01 -0700 (PDT) From: Maxim Uvarov <maxim.uvarov@linaro.org> To: lng-odp@lists.linaro.org Date: Mon, 23 Mar 2015 14:15:56 +0300 Message-Id: <1427109356-16388-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [PATCH] validation: fix memory allocation in odp_synchronizers 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: maxim.uvarov@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.215.51 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/test/validation/odp_synchronizers.c b/test/validation/odp_synchronizers.c index ab9164f..d3539c5 100644 --- a/test/validation/odp_synchronizers.c +++ b/test/validation/odp_synchronizers.c @@ -1052,7 +1052,12 @@ int tests_global_init(void) global_shm = odp_shm_reserve(GLOBAL_SHM_NAME, sizeof(global_shared_mem_t), 64, - ODP_SHM_SW_ONLY | ODP_SHM_PROC); + ODP_SHM_SW_ONLY); + if (ODP_SHM_INVALID == global_shm) { + fprintf(stderr, "Unable reserve memory for global_shm\n"); + return -1; + } + global_mem = odp_shm_addr(global_shm); memset(global_mem, 0, sizeof(global_shared_mem_t));
odp_synchronizers should not reverve memory with PROC flag, i.e. with requesting shared memory object. Without that fix there might be seg. faults if prior shared memory object was created with prior runs. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> --- test/validation/odp_synchronizers.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)