From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 705DFA00BE; Wed, 29 Apr 2020 09:45:43 +0200 (CEST) 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