Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24DC9C83003 for ; Wed, 29 Apr 2020 07:45:44 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id DF8392076B for ; Wed, 29 Apr 2020 07:45:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF8392076B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 382761D94A; Wed, 29 Apr 2020 09:45:43 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id C984B1D93E; Wed, 29 Apr 2020 09:45:40 +0200 (CEST) IronPort-SDR: KmsEBFayS3WCbCldm/f0NSYyC4kdv6GAxLvHRR0f2YxqF5V94idBxE/LZUahccsjmvTn1hxg45 irCBp302vsAA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2020 00:45:39 -0700 IronPort-SDR: G4kw6wSj2XcNVQIH47cDH46KPTCjYNq8L/LZzRIaoNElQ9BBb5tlkaWC00lA3hmIQ10hTg/zs6 4YWP4Wilin3A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,330,1583222400"; d="scan'208";a="276095208" Received: from intel.sh.intel.com ([10.239.255.53]) by orsmga002.jf.intel.com with ESMTP; 29 Apr 2020 00:45:38 -0700 From: Junyu Jiang To: dev@dpdk.org Cc: Qiming Yang , Junyu Jiang , stable@dpdk.org Date: Wed, 29 Apr 2020 07:25:16 +0000 Message-Id: <20200429072516.65403-1-junyux.jiang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] net/ice: fix core dumped issue in switch filter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The number of queues in queue group should be checked before using it to avoid NULL pointer. This patch fixed the issue. Fixes: 47d460d63233 ("net/ice: rework switch filter") Cc: stable@dpdk.org Signed-off-by: Junyu Jiang --- drivers/net/ice/ice_switch_filter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index 179430136..c2762e331 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -1296,6 +1296,8 @@ ice_switch_parse_action(struct ice_pf *pf, switch (action_type) { case RTE_FLOW_ACTION_TYPE_RSS: act_qgrop = action->conf; + if (act_qgrop->queue_num <= 1) + goto error; rule_info->sw_act.fltr_act = ICE_FWD_TO_QGRP; rule_info->sw_act.fwd_id.q_id = -- 2.17.1