From patchwork Fri Jan 19 08:00:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 125102 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp180372ljf; Fri, 19 Jan 2018 00:01:25 -0800 (PST) X-Google-Smtp-Source: ACJfBovsmV9n/b+HpVEtD3aY+z9RTL502PBjZ2TRhgKRf1kjxfHJXSt9rbLihuaTMiIIERMe5D1X X-Received: by 10.233.239.205 with SMTP id d196mr58223957qkg.139.1516348885567; Fri, 19 Jan 2018 00:01:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516348885; cv=none; d=google.com; s=arc-20160816; b=iSGUEsLmJQwM7RKriaksgOQl3cswgHsJ2SjuW1/i3E3kWRePjFp7TlYvkYJyVMYs8s 5ngEYxa/GjorAq5NppHCj+hvt5zKkGa59Hd6Q0MjpXqIbH+6bF9/XUXR+KW5NnmMKY8B 6KLh1jCpLIrQJ0/ihc/eMSjzblwkBpZPh39fKHauRIxuYN7wsxjaELF1ifrM7r7/5lSO JbNMogcpGhWWfsxivEuWxPsmnE7XpEeLQH08rwiKB/L2esoXbc6IaiCIRJ9g4ytq2vET wKH+zktFQrHtRRx8ToY6ZodX3RF5JaJctzOV+9TSbzKm5b7UaEyL0atkCnoLS7+9CSa9 7gMQ== 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=TR4zjRBbln+Syg1ynleD2IBiBUhsh2LUIM/o1/SBJQI=; b=XU9wntIFQ0c26hkhPziwLInst7Hw2GpBX20kFVR5CBmGhtzZt8OHT956A0lSzXBsfb z2eAQXxVreNbH3Kdg0/ZewWBwZFJYNoTmp4CejTHcXJSyfkMG8kYpvPsGejtFLlqq0J6 Rac5rp7kLIevA0X+zKqobrIy6BUbFDHcfOz6DGzPjMql3grHnZGL8jt0fsGRWsgGgOwH ymiOVbU3KFU91+hO25dE5/ByE6IUMAbvfikt2Wx3pVNnZM716H0LXXFDD2H0vQ1aFHWi 2J5s/1/vORpcxzKYdEOO0PwZuUN/VOpWQtvc/cDcre8UZXJNKf9Ekozi7dmw5CCKSc/q yj4A== 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 n6si7714910qtk.199.2018.01.19.00.01.25; Fri, 19 Jan 2018 00:01:25 -0800 (PST) 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 3BFEF617CA; Fri, 19 Jan 2018 08:01:25 +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, RCVD_IN_MSPIKE_H2 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 0FC1462809; Fri, 19 Jan 2018 08:00:29 +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 07D7061511; Fri, 19 Jan 2018 08:00:20 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id C383F61511 for ; Fri, 19 Jan 2018 08:00:12 +0000 (UTC) Received: from mxback8j.mail.yandex.net (mxback8j.mail.yandex.net [IPv6:2a02:6b8:0:1619::111]) by forward101p.mail.yandex.net (Yandex) with ESMTP id 3F6316A83F63 for ; Fri, 19 Jan 2018 11:00:10 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback8j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id zlNBAVRV4i-0AZeTU7O; Fri, 19 Jan 2018 11:00:10 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id YJQDBwfFVM-09l47BQP; Fri, 19 Jan 2018 11:00:09 +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: Fri, 19 Jan 2018 11:00:08 +0300 Message-Id: <1516348808-27537-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516348808-27537-1-git-send-email-odpbot@yandex.ru> References: <1516348808-27537-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 407 Subject: [lng-odp] [PATCH v1 1/1] fix: cls: invalid queue check for hash queues 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: Balasubramanian Manoharan Fixes: https://bugs.linaro.org/show_bug.cgi?id=3577 Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 407 (bala-manoharan:BUG3577) ** https://github.com/Linaro/odp/pull/407 ** Patch: https://github.com/Linaro/odp/pull/407.patch ** Base sha: 5a4502fc6bc53e6503169da3028f456b64811a0b ** Merge commit sha: 44787dd87795aff72073b66dd3ec20adec800536 **/ platform/linux-generic/odp_classification.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/odp_classification.c b/platform/linux-generic/odp_classification.c index 276430923..d97807df0 100644 --- a/platform/linux-generic/odp_classification.c +++ b/platform/linux-generic/odp_classification.c @@ -979,8 +979,10 @@ int cls_classify_packet(pktio_entry_t *entry, const uint8_t *base, if (cos == NULL) return -EINVAL; - if (cos->s.queue == ODP_QUEUE_INVALID || - cos->s.pool == ODP_POOL_INVALID) + if (cos->s.queue == ODP_QUEUE_INVALID && cos->s.num_queue == 1) + return -EFAULT; + + if (cos->s.pool == ODP_POOL_INVALID) return -EFAULT; *pool = cos->s.pool;