From patchwork Mon Jan 25 15:03:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 60370 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1408917lbb; Mon, 25 Jan 2016 07:03:27 -0800 (PST) X-Received: by 10.107.164.25 with SMTP id n25mr19807450ioe.143.1453734206884; Mon, 25 Jan 2016 07:03:26 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f8si26968959igg.38.2016.01.25.07.03.26; Mon, 25 Jan 2016 07:03:26 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 345AA6162D; Mon, 25 Jan 2016 15:03:26 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=WBq3fqIp; dkim-adsp=none (unprotected policy); dkim-atps=neutral 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.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, 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 32CF661643; Mon, 25 Jan 2016 15:03:21 +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 73A9D61685; Mon, 25 Jan 2016 15:03:19 +0000 (UTC) Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by lists.linaro.org (Postfix) with ESMTPS id 8C0F86162D for ; Mon, 25 Jan 2016 15:03:18 +0000 (UTC) Received: by mail-wm0-f43.google.com with SMTP id l65so67611675wmf.1 for ; Mon, 25 Jan 2016 07:03:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:references:to:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=RPJsC3BixaPiiF7MMaBJfqqZjpRqKrepq7RWgSTvb7s=; b=WBq3fqIpZWRRvb4AiYzGEZTwzhItTmulz6E/XdBUhMl9xFYfFtXTgT+MMnX+NMTaTe 8af04AFZERzSVCdLNMFKPQg/20SP2nM6NYHHLSaQ9oz6StAsxHWuY6888P9Qd76ECo43 ldRWY1MZ7GaPbt5yxwVIh5B68lqaAiYqMluxI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:references:to:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=RPJsC3BixaPiiF7MMaBJfqqZjpRqKrepq7RWgSTvb7s=; b=LWY7YkGg+kx4IFFnNBUn6T99PJRo6eG7PU+C8sijbZRZsOGkPV3oEtTWE+YWp5xG19 +w+/qsEZwod4nx4ULVUZGnvWseZgUhiU/HyzMyn1BxRARC3Qjx9lP9Yq82wNVwknBb68 8ZmnCqnd1mRNBA7Swf0JXh0QhBy/gUOCkLoVFWi4x7wCvKZhqJ8T7RHGeiQjprQwAF0u hzvRc25D2xbJ8Q1bdt3TOZP/vB1TD3KQX6bJv99IBcRsNMJik7NfJDOf4dEecq/AhjlQ iaTCBPu92qlQJHFD0+bTIZGedllVlDzDib3eYpXo/9hssrG5MtW5zRfQieX8AEDGSava 3M+w== X-Gm-Message-State: AG10YORUrtTEwiaf68FJcrA7AMYKjAIcN7g2CdwD6T85IGBrsHoJ+WDHyvF6hoYOMTEGs556j6Q= X-Received: by 10.28.111.194 with SMTP id c63mr19417717wmi.90.1453734197619; Mon, 25 Jan 2016 07:03:17 -0800 (PST) Received: from [172.18.45.59] ([195.11.233.227]) by smtp.googlemail.com with ESMTPSA id 198sm16682254wml.22.2016.01.25.07.03.16 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Jan 2016 07:03:16 -0800 (PST) References: <1431944672-5001-6-git-send-email-maxim.uvarov@linaro.org> To: Maxim Uvarov , lng-odp From: Zoltan Kiss X-Forwarded-Message-Id: <1431944672-5001-6-git-send-email-maxim.uvarov@linaro.org> Message-ID: <56A63934.4020406@linaro.org> Date: Mon, 25 Jan 2016 15:03:16 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1431944672-5001-6-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] Fwd: [lng-odp-dpdk] [PATCH 5/5] dpdk: do not segfault in odp_queue_destroy() 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" Hi Maxim, I've spotted this patch which went in to ODP-DPDK instead of mainline ODP. I think it would be better to push it there as well. You can add my Reviewed-by: Zoltan Kiss -------- Forwarded Message -------- Subject: [lng-odp-dpdk] [PATCH 5/5] dpdk: do not segfault in odp_queue_destroy() Date: Mon, 18 May 2015 13:24:32 +0300 From: Maxim Uvarov To: lng-odp-dpdk@lists.linaro.org Signed-off-by: Maxim Uvarov --- platform/linux-generic/odp_queue.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index 4a0465b..63744af 100644 --- a/platform/linux-generic/odp_queue.c +++ b/platform/linux-generic/odp_queue.c @@ -247,6 +247,10 @@ void queue_destroy_finalize(queue_entry_t *queue) int odp_queue_destroy(odp_queue_t handle) { queue_entry_t *queue; + + if (handle == ODP_QUEUE_INVALID) + return -1; + queue = queue_to_qentry(handle); LOCK(&queue->s.lock);