From patchwork Wed Oct 18 15:00:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 116315 Delivered-To: patch@linaro.org Received: by 10.80.163.170 with SMTP id s39csp2467571edb; Wed, 18 Oct 2017 08:03:15 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QiGqpIMhDmUi4Sb+6Kjvb3Q19fih/2FgephrRLpO+jvJwC10oGFOcLQZt7axj3NS2oaVWh X-Received: by 10.157.10.56 with SMTP id 53mr4535515otg.312.1508338995703; Wed, 18 Oct 2017 08:03:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508338995; cv=none; d=google.com; s=arc-20160816; b=iUYccZiC1dv+PJBtUmsXlzeCcFGnJC2xae05LzdmYnteEBXrdEyYYJH9krIZusVtbK b2PXt0l4nZFQbj/73xAJP9pZqbTVEAWe5f6UW4HVijvEM2+BUpBRZzPFrnpT725vw/ld VNU3bxxY7fgzeIqxW278leCH5ajE6yoFJozTIKm5BiBXr1+Cyd9Cxqxnih2lQUlj2lgE mWTm0QAilA5aeC1/9wT8TQnjjMhYbL3ABLPtcC9/oxinyNSJVB+joxptcjktkGud9fDY HEaFzHtQhk5r6jInXLngHEdZAjz5pfaPxP5wZAdgd4TFI8KGhcvnoVn5xYJvqxjLDAlT ggog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=r6yy2/4Q0AnmqYNTMREKGx+VQlTFhpvDg4RTYjYOIvI=; b=ks2i0PmvlJc6a6POzTDBgRJQMG2KdZne2UXWwKtClKATfmmaFDpH0zYybY/pUqyTkt MsANKcasC7NlZXAowmGBV8xvD27JaJ1WlrZfJNPKDRtIRGBe2Xuq41bs8HOCXR+ZI9vH FjMG5Yfu8RccE+RFh8YxDh9crWeLPr5AY+Y3nEBZ46wNe2Qkn3yxHiqTrHDima9aFZn9 MON6LfavWArGt182yj2Ts2pxP5Vd6xtlzTdzkx5GP5SY/FYqvCx0VyelbPx6WCzrqpvE IUYp7rwA3vq1smoOJF6iwA3mKUzwIeFF2iRrOmRpAEatomk9zuIOUQi2+AAyhdzWgCO/ SFdA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id q75si3801199ota.334.2017.10.18.08.03.15; Wed, 18 Oct 2017 08:03:15 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 097F862AE9; Wed, 18 Oct 2017 15:03:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 2BCCE6204E; Wed, 18 Oct 2017 15:01:39 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id E857E6102F; Wed, 18 Oct 2017 15:01:22 +0000 (UTC) Received: from forward106p.mail.yandex.net (forward106p.mail.yandex.net [77.88.28.109]) by lists.linaro.org (Postfix) with ESMTPS id A9E1962913 for ; Wed, 18 Oct 2017 15:00:25 +0000 (UTC) Received: from mxback20j.mail.yandex.net (mxback20j.mail.yandex.net [IPv6:2a02:6b8:0:1619::114]) by forward106p.mail.yandex.net (Yandex) with ESMTP id 99D722D8399F for ; Wed, 18 Oct 2017 18:00:22 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback20j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id UnPpEZA5yP-0M3iTw69; Wed, 18 Oct 2017 18:00:22 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 6SG6N26vxh-0MCSvelc; Wed, 18 Oct 2017 18:00:22 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 18 Oct 2017 18:00:04 +0300 Message-Id: <1508338806-1394-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508338806-1394-1-git-send-email-odpbot@yandex.ru> References: <1508338806-1394-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 239 Subject: [lng-odp] [PATCH v1 1/3] linux-gen: pktio: add missing unlock X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Maxim Uvarov add missing unlock on return. https://bugs.linaro.org/show_bug.cgi?id=3242 Signed-off-by: Maxim Uvarov --- /** Email created from pull request 239 (muvarov:master_bug3242) ** https://github.com/Linaro/odp/pull/239 ** Patch: https://github.com/Linaro/odp/pull/239.patch ** Base sha: ec0c3145fcafa09ae3a79875e7e07dd4794583cc ** Merge commit sha: 13cc3007dc36c8942ffe7dd834f3812b32ae2ae3 **/ platform/linux-generic/odp_packet_io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index 5cf94a146..c2e6742b2 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -202,8 +202,10 @@ static odp_pktio_t setup_pktio_entry(const char *name, odp_pool_t pool, /* if successful, alloc_pktio_entry() returns with the entry locked */ pktio_entry = get_pktio_entry(hdl); - if (!pktio_entry) + if (!pktio_entry) { + unlock_entry(pktio_entry); return ODP_PKTIO_INVALID; + } pktio_entry->s.pool = pool; memcpy(&pktio_entry->s.param, param, sizeof(odp_pktio_param_t));