From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0075.outbound.protection.outlook.com [104.47.41.75]) by dpdk.org (Postfix) with ESMTP id 31D6A1B00C; Tue, 23 Jan 2018 14:03:20 +0100 (CET) Received: from BN3PR03CA0100.namprd03.prod.outlook.com (10.174.66.18) by CY1PR03MB1423.namprd03.prod.outlook.com (10.163.17.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Tue, 23 Jan 2018 13:03:19 +0000 Received: from BN1BFFO11FD006.protection.gbl (2a01:111:f400:7c10::1:167) by BN3PR03CA0100.outlook.office365.com (2603:10b6:400:4::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.444.14 via Frontend Transport; Tue, 23 Jan 2018 13:03:19 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD006.mail.protection.outlook.com (10.58.144.69) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Tue, 23 Jan 2018 13:03:19 +0000 Received: from b27504-OptiPlex-790.ap.freescale.net (b27504-OptiPlex-790.ap.freescale.net [10.232.132.60]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id w0NCR9X0020973; Tue, 23 Jan 2018 05:27:14 -0700 From: Nipun Gupta To: CC: , , , Nipun Gupta , Date: Tue, 23 Jan 2018 17:57:01 +0530 Message-ID: <1516710427-22843-2-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1516710427-22843-1-git-send-email-nipun.gupta@nxp.com> References: <1516710671-13897-1-git-send-email-nipun.gupta@nxp.com> <1516710427-22843-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131611861997937660; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(396003)(39380400002)(39860400002)(346002)(376002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(4326008)(8676002)(86362001)(498600001)(6862004)(450100002)(106466001)(356003)(81156014)(105606002)(81166006)(47776003)(8936002)(104016004)(50226002)(2351001)(69596002)(54906003)(2906002)(16586007)(68736007)(50466002)(48376002)(51416003)(6666003)(2950100002)(97736004)(85426001)(36756003)(336011)(59450400001)(77096007)(76176011)(305945005)(5660300001)(53936002)(26005)(316002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB1423; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD006; 1:n+OdwVYzAU04h7Q358cGLp1H1WjZduqr1J2BpPcu+AK6s5kDtekvhXkQ3YY4Z+XAKdcrCA3yik+TGqVdZiYBM5cXS0ztSN+n/dyLg9P35Oy4doFqsyovpPi5UY9nQcCs MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 49546972-f53d-429b-58fc-08d56261ad01 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:CY1PR03MB1423; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB1423; 3:WtKP78h3JNL7qPLhLxm+XZIlhevueqSdA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X7X45fKLtKvGvrEtuSKq1NSK2UohLE4kO4kYIiik53lu2rYlo1lPGBMZrjL6cBLKR7Jtp7hptY7VWLCVs++r04Z9odoRzEKXyGU0pFOz6jJ8uNCv3HuHvp7F+MTaVs+ij9tEF8ck21+sc19SV3Po33/EiCEkyFWTld/8lg3ABLDNXA0RmlrsKvnGLwtRgNHTirBDryZ0Qu1Wn4l1Q1zOJuBfRvjiJWO8MA7AFf1HjNa7g+eltMOp X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3231023)(2400081)(944501161)(93006095)(93001095)(10201501046)(3002001)(6055026)(6096035)(201703131430075)(201703131433075)(201703131448075)(201703151042153)(20161123559100)(20161123563025)(20161123565025)(20161123561025)(20161123556025)(201708071742011); SRVR:CY1PR03MB1423; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY1PR03MB1423; X-Forefront-PRVS: 05610E64EE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB1423; 23:23Nh+59tNAeEfcuWR8c+Bj67ZKKs52mbinId2Nw5E?= =?us-ascii?Q?S/x0akNKgwJTRyI3NKWN1L8UgybkYwwykO7wtDoi8VIaiWqwDJ4XG+UpBD20?= =?us-ascii?Q?LG2JG2++inVY6LIxWm3x27TkLwQ2n8WG6gCf80knVNt+NCqMDkCPdbERJRU4?= =?us-ascii?Q?huP7TD+6nQmBEJYuxKEj+0Ed6J5mF0EgHOxcbPWgFHS03+oSGraeSGRJ95w+?= =?us-ascii?Q?y/EDsD2dMWOJdp7IPxTBTHJkN5L4bbzSk3nHEJCdt2qR52/VTtw281HtglWv?= =?us-ascii?Q?EzLKx5d3hKpQA9wogCh04ySe/Q1F2/XvRZ8VJ+pPVbobAepzO16k3l2wAX4W?= =?us-ascii?Q?roBNObSnUKg1SOKC+pMig1bhKUcy068c2LjIWdMVHn7axQRA5XqoUEMQd6Gu?= =?us-ascii?Q?8M8ouBd8QZW4UfqXKfV5Xuf74dbP882SYaNVnAtVgqvDrHcns56smqzY+Uct?= =?us-ascii?Q?4wfmrpmDapCieplWMjcqQ0bBolL11lATdChlShxCLGI/hXtxMWQ34jflrcQN?= =?us-ascii?Q?I45yumPCbuPA6vr/szc1IunwpyI9WkdfIdAN5yUf6SVMK70GBK/BpVV475Gt?= =?us-ascii?Q?PYZLXTmPdZw01n1Yxpd28/zsBn8Yxrv50MmyPbH9gyvWWP3nO2PozXpA+52P?= =?us-ascii?Q?Q5YmgEmgcoT9a3x1Kc/284+TyNdwMhClJkRyRUzyLB+Hlf++4P+n9MHFzNFK?= =?us-ascii?Q?U8AphAJYno6DIWOvze8TO957B927G54wOvoKkyAvCHmVlc0cIC2GVuC4LQ36?= =?us-ascii?Q?jovoCx+l63Hy+FUgYciwa+ufesqCYCzeAycPP/LpckGpLvsVQi1IHDHeQdCF?= =?us-ascii?Q?5e4cpwpZMINJNe46gYzyHAe3c18AzwHCn9t/wsjqFhO7ycRHvk8xXluLo+qY?= =?us-ascii?Q?HpJ9FniRKISpNfD/MhUDL9IQmAzV0CxzVX8oolUBzPxl+0mXTuEkvV8AVW2/?= =?us-ascii?Q?PqupVPgsAJyjPENziBcDwr/pumBjdgxWWhqoC9GbWySF1o2EXI64PfRQtktG?= =?us-ascii?Q?/BoIMzP0ErpXf8bzNuxlcm0J+o9VFNSFbq3/6fsYkHhOmxnrpO8xZIl1BlKY?= =?us-ascii?Q?RI8s9amvryD/SdTNj9xnsIXno5cTOyDMbgAmFEZ3BAxzIrQV4c/YgXbasrrm?= =?us-ascii?Q?jj3Ouobt5M049Z1Gr0/OtuW8P2vLOQiVrs0JbtYzQ5X207ljmgikay/lUByn?= =?us-ascii?Q?Jed2I9m35r44v2q1lPZMoaJtYi/M+zzC/MVd0rT3PelSrCQP8MOtyaKZHASs?= =?us-ascii?Q?YHIixdSvr44r6d9EMk=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB1423; 6:OgQYX7kr0ZPWJRsYDNxlYOZvGeNWbo4aD+xTqSv8cKzThrEDwnOKk/qakomEdXnpHP77FaYuq9TP4H5qIsWRKL6sv1X0Z1DhN9xUZZotGjkrIBnUf4PuLonvT3HMyNzF3KXC5N+laTG4VGGAicXcCgEIG+IaHCZydY35ILUTkS2Brb4P/MQeShtAEAULL6tx4AABKkmKBd9IP2B/hiVIDcLehXySRAs8i/Vrzvb13Dc6rHamHazCl2Dy7GL5G5EQ9lGbzqObobqbmQKtbshKwr+i+7H4VdV8PVXkazupX91IPvjC9bM23RsYFjDu7M6z4oW6MYpqAChCEWaO6oZBbxCXoeIDG9cEzN0WbqOo8KA=; 5:fYhbJxCN5Sh1CmoehRnh8/ihC/pu3APAggmzbhTDy7aTL06c2/ahZLwROTwHvXf2+Tl5AfSa4VyJeaRUxdM0S2+Kiz0RNMPxb0lPrwtbBJypbrC4piUigzWvcxwh7auXAMB5uFvUdZMrL/rm7Lap18wai6Wps4oPjOJ75udjDPM=; 24:OdQLtrS03c6SPw+j8xODn7ottgKz6h5YvXezwoPhKFRdNrasuk1Zyz009MwGmKmRWlrvjm9zBi/IagcGRWF4U2XfcD+HHSJkg26ZpIidaF8=; 7:seNIV7FWMM8nD6txck4SGjJiU4M6jYuDr3AW5DkSwZlmk8tgzQMOC7Sre8KB1GYk86kbFt1DdtW51rIObg7n456DCYAN0/LXgIgLMF6aE57TkfWW+nHtRBZce4XXeOlTq2ukezpUXTgDorjZyuFejH+mX2+IZquBe73bCAzruY/o9aSFuY4tXfJgjpBJ301WplRzonjzISj7BCohOTED/tI1Wguwd5+li8abiK6bZAYDsVDn9t7MmilYt4bzXbPB SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2018 13:03:19.4349 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 49546972-f53d-429b-58fc-08d56261ad01 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB1423 Subject: [dpdk-stable] [PATCH 1/7 v2] bus/dpaa: check flag in qman multi enqueue X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2018 13:03:21 -0000 A caller may/may not pass the flags in qman enqueue multi API. This patch adds a check on that flag and only accesses it if passed by the caller. Fixes: 43797e7b4774 ("bus/dpaa: support event dequeue and consumption") Cc: stable@dpdk.org Signed-off-by: Nipun Gupta --- drivers/bus/dpaa/base/qbman/qman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index 609bc76..e7fdf03 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -2198,7 +2198,7 @@ int qman_enqueue_multi(struct qman_fq *fq, eq->fd.addr = cpu_to_be40(fd->addr); eq->fd.status = cpu_to_be32(fd->status); eq->fd.opaque = cpu_to_be32(fd->opaque); - if (flags[i] & QMAN_ENQUEUE_FLAG_DCA) { + if (flags && (flags[i] & QMAN_ENQUEUE_FLAG_DCA)) { eq->dca = QM_EQCR_DCA_ENABLE | ((flags[i] >> 8) & QM_EQCR_DCA_IDXMASK); } -- 1.9.1