From patchwork Mon Mar 23 13:03:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 46193 Return-Path: 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 7981B214B0 for ; Mon, 23 Mar 2015 13:03:45 +0000 (UTC) Received: by lbvp9 with SMTP id p9sf27177594lbv.0 for ; Mon, 23 Mar 2015 06:03:44 -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=BeZKRx1npfUgkD+8noClxKedwZVVU0r9J1xwY+/G1SEjbuv3pCy1EMQMTh8+OxUwRp uCmExXO+6YW5yWB2X+Fd7HslEk82iUnhlpos1zxYBvjtFQfkozHfXlYG8Rf+0fmH/8U9 18fF5XmmWJKfGBbiHiAF/qUo9a5CC8qSWBb9jPc5HiOWPU8/HfgiudE/1Fz9dqLxk3b9 Yl51APOExI8PpE6tacTZlOavngKTxnYfKhEpESASttUFrYubYyYLVdTI3e2IWAKqL0k9 AT/0TUrL+xvEca9LJhMg/Sm67WI8fyfqF+r85SCvAazt+I7eZsqw6CjBXz1demL5h7bv By/A== X-Gm-Message-State: ALoCoQlACWdKYhSSZonkj9iDleUfi9WkMDROZN6sHzQBmP5He+EEpkGi2SJWJGL36W5aTKmms4F/ X-Received: by 10.112.130.70 with SMTP id oc6mr15937499lbb.13.1427115824410; Mon, 23 Mar 2015 06:03:44 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.242.132 with SMTP id wq4ls691822lac.30.gmail; Mon, 23 Mar 2015 06:03:44 -0700 (PDT) X-Received: by 10.112.162.167 with SMTP id yb7mr81860867lbb.76.1427115824265; Mon, 23 Mar 2015 06:03:44 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id l2si567357lal.97.2015.03.23.06.03.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Mar 2015 06:03:44 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by labe2 with SMTP id e2so58043648lab.3 for ; Mon, 23 Mar 2015 06:03:44 -0700 (PDT) X-Received: by 10.112.162.232 with SMTP id yd8mr17138637lbb.41.1427115824176; Mon, 23 Mar 2015 06:03:44 -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 k9csp812679lbq; Mon, 23 Mar 2015 06:03:43 -0700 (PDT) X-Received: by 10.140.91.71 with SMTP id y65mr113657571qgd.90.1427115822940; Mon, 23 Mar 2015 06:03:42 -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 x143si590902qkx.96.2015.03.23.06.03.41 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 23 Mar 2015 06:03:42 -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 ) id 1Ya215-00038x-HS; Mon, 23 Mar 2015 13:03:39 +0000 Received: from mail-la0-f54.google.com ([209.85.215.54]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Ya20z-00038r-F8 for lng-odp@lists.linaro.org; Mon, 23 Mar 2015 13:03:33 +0000 Received: by labe2 with SMTP id e2so58036695lab.3 for ; Mon, 23 Mar 2015 06:03:27 -0700 (PDT) X-Received: by 10.152.43.51 with SMTP id t19mr82765977lal.73.1427115807775; Mon, 23 Mar 2015 06:03:27 -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 n8sm178604lbh.4.2015.03.23.06.03.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Mar 2015 06:03:26 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Mon, 23 Mar 2015 16:03:21 +0300 Message-Id: <1427115801-23689-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: 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: 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.43 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 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 --- test/validation/odp_synchronizers.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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));