From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0056.outbound.protection.outlook.com [104.47.42.56]) by dpdk.org (Postfix) with ESMTP id A24123772; Tue, 23 Jan 2018 08:24:54 +0100 (CET) Received: from CY4PR03CA0021.namprd03.prod.outlook.com (10.168.162.31) by BLUPR03MB1409.namprd03.prod.outlook.com (10.163.81.143) 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 07:24:53 +0000 Received: from BN1BFFO11FD015.protection.gbl (2a01:111:f400:7c10::1:180) by CY4PR03CA0021.outlook.office365.com (2603:10b6:903:33::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Tue, 23 Jan 2018 07:24:53 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) 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.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD015.mail.protection.outlook.com (10.58.144.78) 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 07:24:50 +0000 Received: from b27504-OptiPlex-790.ap.freescale.net (b27504-OptiPlex-790.ap.freescale.net [10.232.132.60]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0N6G0dt023569; Mon, 22 Jan 2018 23:16:05 -0700 From: Nipun Gupta To: CC: , , , Nipun Gupta , Date: Tue, 23 Jan 2018 18:01:05 +0530 Message-ID: <1516710671-13897-2-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1516710671-13897-1-git-send-email-nipun.gupta@nxp.com> References: <1516710671-13897-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131611658931271099; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39860400002)(376002)(396003)(39380400002)(346002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(36756003)(8936002)(336011)(68736007)(50226002)(26005)(356003)(4326008)(105606002)(50466002)(48376002)(2351001)(86362001)(5660300001)(97736004)(81156014)(106466001)(81166006)(77096007)(8676002)(450100002)(104016004)(6862004)(2950100002)(53936002)(76176011)(51416003)(85426001)(305945005)(59450400001)(16586007)(54906003)(316002)(498600001)(2906002)(47776003); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB1409; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD015; 1:D+k5dlFSptdPFsppTu8ZSID5bK3d04ifoZHcXu9MyWy4WjvX4+SqENyA2HOvERY3izsdaQBgANXS/mDfjG0ynOZozhrdsYIq1uvA/jcnH8wPLW1oRcLmpb3VirL+szpJ MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2d2342b3-e916-46ba-945a-08d56232655a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BLUPR03MB1409; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB1409; 3:mE4x+nrg49+UD27sbM5YBQ6T3kKkhZhr/8n//kaAVm9RZW7nlbU/ytkDCfJJJRICA6jilZvzbviu8V4VPhMBxhV+WJNt1urtBHuqX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R0fTOoJNgsFUkkNZTHZuJUmwuwe2ZGJSaW7agatC3kAAIHbnZYRE1EfO8ROmvfbYsrdk3BxXCI6Al3JbOpaVJXJ7p4FEL3Td+dy15BpjxTUhgcMkh7JFrLqwQcaSG6JYBpwrouS10JDG5Wpg5V+GhGN0Xl4lQr 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)(20161123559100)(201703131430075)(201703131433075)(201703131448075)(201703151042153)(20161123556025)(20161123565025)(20161123563025)(20161123561025)(201708071742011); SRVR:BLUPR03MB1409; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BLUPR03MB1409; X-Forefront-PRVS: 05610E64EE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR03MB1409; 23:j1sAEj4to0Z/lh82ocJpkX/cmDh3ONv2XACMKLdC5?= =?us-ascii?Q?67s6L2XgUKW+Y8HMeP0RvrDvjV/455zMrg5ZcdN67p31DQBF9wFWib9lxhqB?= =?us-ascii?Q?AFxoFaammL80os6ylsh3RaiUCxYUOGIrE1C9S8PJc2qHCzA3wkfk7V/pIBwA?= =?us-ascii?Q?VJwDeggB7qGXXuAVov+c1LDyZX9wX3IiYDc5h6tuX8YlV2HX4wGocjE69A4R?= =?us-ascii?Q?uQhSU9r79fziLApsc4PX82xVG6j0JJI18SqzlIVaPPP+XfjxZPp4D07Dmkg8?= =?us-ascii?Q?sZ1aUXSc8/nNH+n0w4mxeWg+rdAzSTOgSzREsYiVUPoTDARa9PE1dXEXHMWw?= =?us-ascii?Q?C7Pe7ikqEAGseFuq3+IH6L+DiCyI1J0vv6Q6bMlh6sOEuA3Y1cXMZeXXY7rh?= =?us-ascii?Q?j2w8fAQlJm98MPAu10wdhYghA93VvmhVCHPIq3Z6zj1nFIc2XKcnLIRPdsGc?= =?us-ascii?Q?dWN7jF4CAw3HCTMgWSQ51dzIIKlVn2XC4nkjzuyE8GA60LL8SEXj3ImmdNwt?= =?us-ascii?Q?C1zkQH52yiz02A+H0PHitj6dQytUFwR5gntWE3KWbMPnHsHNwr/r+nl9hZWV?= =?us-ascii?Q?EJVyqz7obmcmdzN1uIXpxZauv7VaxdJ03mALxWukE9lkTnHagDIEe5C+vYMo?= =?us-ascii?Q?R8S04ZkC4qf4yhdfEwNrApdEASF8TPaolZOeLD80QZr7E/C/6+xRwRxCLbJX?= =?us-ascii?Q?21Y7amy9vqGkrcrrtXZn/lKE0bYO9FHpNh9KvC4sMjof5ikmY9w7EydtOqEF?= =?us-ascii?Q?V253L0hp8UhH5mDwUhLGJU4haDU5oXwllGnSVgVQ/Xl0fibSswViS9DSlU0Q?= =?us-ascii?Q?uNgHjzL7cFs2EYi1kqWJBcrTPqCx6lKQDnQsOnGeKZdnqtLKOqxeLRaXSvdP?= =?us-ascii?Q?6f2eVdOvnOy56UQb03LGnQbMzOEQpp3lHNUqXNszahgOGcd2339q/CJkhmPO?= =?us-ascii?Q?6mfGbn9xquCSrMYRC32y691yglQ0CkvVkDK4OdmK4HQVetZFC6e7TK9Ee6sN?= =?us-ascii?Q?n5bWIuStQCWEdlFWh39qR16sF2rYuCYngQCKUDdVZCT336P2BZWKjIaTSTAM?= =?us-ascii?Q?INr9dVLn2JZLT8xhZvJQkRWG9jDvBrC4G/9pnKcxv/G68x38lMfliVUtqhJc?= =?us-ascii?Q?AQojhvARaA=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB1409; 6:RXoSrRA9ZCEzLoDl2JZGNbvOoXe+yZcTFA7os8ORiComPalxOv0xLBBk6heBz1e8+n4tfiKSvRjaskFFgv1jnD0pyU1OujtCxgS35y8vrY+Sl/ZXwR124fOT7Wel4/0XoVLxIqTD+JUZX0GWlC7In+VBnNedkNBhDKf9djpL3cHH+ex47VOVnYxIEZXUyjRT0ihSeDVThdkR+ZWq3T2sKf319xoiJa9fVRUsTl112ModAYg/A84mSqGNrGkZspoueR+3eQJnRDCHZhzvUyOx7BLlKt50A1uLtOw2EANyvdMlKUxURE12jZyEWCX2xiKsXWPh9Bre/cfR+4ANa1cjzd8GcVhrmn+hNe0CtOi74nw=; 5:OH2GszXzxhcLB/xo7WEuKDkBOswJLqWhbiKbM+JQq9eeooC0thrzjNpU5ClMxaN9HSXXf775NI4hjVLPy5J96xn/6mN1bP6KjlfAsuT8+faE7qW0htViNZ80GcMJMriwdLp2Z5A0akmaddBm+6TJC1nyNwJNDPCveyUCAId8eVI=; 24:g0fIAcfg0p+VvhQcrCiHOjR4mU+DbbBb7uMZLYObQRwnhIQQmgeAxF0LWh+VWRH5rxv1FXlM6iJUiWrEKIhWCJLNuFwvzLyMuqXaJ20vdDk=; 7:D8TsF2RKzn/p75kedJNrx+kZln6gbv6QWHdHbcdBqbuFYZ7c/0dCxjAXRHrEpQlfyGaDPfmgttmyWZ+BTQ+2BJ0mot+fD9bydTj9IFko5ipCvuQdyBpNDpT2QvQt8INKAvIncHmTbv/VJeH4WntPSs3F+Gu1eVL7R/3d47n0cCWSDPB2R+k8p0DRD69qGHITf/6THYSizggzfqp301rBuO3eaIBFM8ijt+xIQah1ZFnEHiKQYMe1Z92ddgtKGd2w SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2018 07:24:50.2410 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2d2342b3-e916-46ba-945a-08d56232655a X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB1409 Subject: [dpdk-stable] [PATCH 1/7] 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 07:24:55 -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