From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 885D0A0547; Wed, 21 Apr 2021 14:12:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1277441A8F; Wed, 21 Apr 2021 14:12:49 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70083.outbound.protection.outlook.com [40.107.7.83]) by mails.dpdk.org (Postfix) with ESMTP id 8CD7E41A72 for ; Wed, 21 Apr 2021 14:12:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fM5asMAxvDiG1qEBoAhbkmY2zQMW2s/YMGMQfw2dLe8Li8O+VEQK4Z9RVDPGgjZ9+Rq21uDVqfyMJS2NcDF7B1m8zQbCJ7qgGJEDXoIkI7FS57T192BwyLxM4VRt1jUSFpHsLFxHYEXh+TdqyHzn78+uhGD5O940UuZqbaZR4xFhPQXQNgu/5MTIv+IVVbQaztB5IG0qxS6Wkm/b9Z1dk4ZtFO+ErAVaKLZsieUBvKD9fi+5lf/Wt5hfbuZlIX5Y/foG9ry0HBkEcoNpcDDdT+yL/q8zyiRMsHHmfO5W5dgo0vbUXhco2fhUBpvZ//ab0Vbdv5OvEJoNPI3drzfzbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sqVQpJ1vlFhp7XIUQ0mXb6Kyq0SbFDkHCJd1cluJogs=; b=mRwjN5fQljkDe2Jyk3jNs4rqDUgHtHYCqGiRcF5nre5YHwEFV1kvfA+wgN9uu1j+WPQDCjHSYbZkwiS8y26Gt5RTosfPkZCraATT0e41nX7AyfZwUJ/OC5qJC9HLRmUPJTXmkpwPVZKQX7b6xScOaJpgL5As4ikbJtUvqy5TzZQrU/sa6l0JXiQwriF2R2r38uuFVFwMFwLEM6Iy5E/4j9TraWJMjj+Q24mwnE/2BAv3hotLjk4BuYingip/tqClBgx2W9FCuw0XIeSl5PW3lpe9Vqj4A6S2O206YzNZRRxDAtKH+iCq4hz2+EbCmhjQbNFwv4KDTbuRNNTmlOtN/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sqVQpJ1vlFhp7XIUQ0mXb6Kyq0SbFDkHCJd1cluJogs=; b=hMq3DNPBqmsMJ/8f6a5/pqS8x7eJEV9k+xDv9XkYamrmBHJnbCw3xJY8syIQkzYYRA3uyaAKh4nBDW+dvhc+YgYph4gTuZuONPecJm7fGAzgadaLP1wwsUZS5+tnZM25JsaLjmTkqtR57TRUWUw8/R9WR4hp7q+4N5n45mhzesk= Authentication-Results: oss.nxp.com; dkim=none (message not signed) header.d=none;oss.nxp.com; dmarc=none action=none header.from=oss.nxp.com; Received: from AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) by AS8PR04MB7717.eurprd04.prod.outlook.com (2603:10a6:20b:292::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.21; Wed, 21 Apr 2021 12:12:46 +0000 Received: from AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55]) by AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55%6]) with mapi id 15.20.4042.024; Wed, 21 Apr 2021 12:12:46 +0000 To: "Min Hu (Connor)" , dev@dpdk.org Cc: ferruh.yigit@intel.com, hemant.agrawal@nxp.com, sachin.saxena@oss.nxp.com References: <1618973213-25718-1-git-send-email-humin29@huawei.com> From: Hemant Agrawal Message-ID: <3bbcd4a3-13bc-7573-a33f-e6013bb77cf5@oss.nxp.com> Date: Wed, 21 Apr 2021 17:42:37 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 In-Reply-To: <1618973213-25718-1-git-send-email-humin29@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [223.178.219.73] X-ClientProxiedBy: MAXPR01CA0097.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:5d::15) To AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.2] (223.178.219.73) by MAXPR01CA0097.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:5d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.20 via Frontend Transport; Wed, 21 Apr 2021 12:12:44 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7f2259aa-b7da-40ee-6bfc-08d904bec5b0 X-MS-TrafficTypeDiagnostic: AS8PR04MB7717: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:403; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UFzCtm7ItkgcjHz4IPWulE0pbheRCHCNtsAk4qy5S8BUZVZuaL1DNC7yX4g0zxdoBtuT3Xcr5bzJnF/Y0SrhmtffuLF/T/KeD8rukFAwNQNDLZpsqiP1/9ZhS44VRVy8kdtAUm4DOfn0ELpm5TaT/TwyGQxvtuHijkX6mIDogV9JbPnvxabGoFOos8MNSykCsOp85RYr1zNvfsnIWjWxtDvkszWtNKUWBmMVVXPBJ6Ku37uNYKgT5W3G3vczWKuxRmzVlOc3I/IVNzo/mpySpb+kbO8SA9BFgkZggH6pB+PX4sOYYZjlgrz8f1C24KL2v9ZdAHrDkmglBVKxq/FrRKLMOfKrwt9CMJv5w+jGfF60skrHKGEUV4mxfJQvi55RJ3yixgj+N9RzrSExMbvIMbCQ+kvXIgbtlF85O7kmbuSrKUSpujUMdnOk5XjR+UJN5zgX3Ci+rVSVe9fHfHTs0tSplV8ITW2QIvOyxRFstMf6ytNdrVL4FFNF/G6FQDiQUrZ1eAMv7CB6UvFKvr+73kyPp7oymh4s/fSEp5UDUEjDib7neZ3FnfGJHCkW+9eXRG+MBCrE4MaVw/UlIlIY/mKASscSTKTo+Z5Vf5y8tx1Ni5Lu8BhHG4c4i4d+bH0LjfTS9V/sthne7j6WRq/12rG5YDxdCd7eh8flukhHPXB/Gw/xdHLfJVGNskqDsWQAjHtrYgApRjMGM+P9//2F0grjXX1tOKs7kJI9t1svlV4= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4456.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(366004)(39860400002)(396003)(346002)(136003)(66476007)(478600001)(2906002)(66556008)(316002)(44832011)(31696002)(52116002)(31686004)(86362001)(66946007)(956004)(2616005)(26005)(4326008)(6666004)(16576012)(6486002)(8936002)(38350700002)(16526019)(186003)(53546011)(5660300002)(8676002)(38100700002)(83380400001)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?aWQ1RXZQaDhrQ1daL2ticG91YTF2cjRuUmp2dTJ1V2dCMWpMMnBnSGJpQk1R?= =?utf-8?B?WnJ2cDRtUVhsWlhoV0tjNTV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Exchange-CrossTenant-AuthSource: AM6PR04MB4456.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Apr 2021 12:12:45.8835 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: AnnoWLyUZ1exUd/AWCwiaOoNiEe2ESb7M3+dJfvap6gpmEJZZ+qoe2620Ct05Uz/US/ke/cgXF2VyeoL5pbu8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7717 Subject: Re: [dpdk-dev] [PATCH] common/dpaax: fix possible null pointer access X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: hemant.agrawal@nxp.com Errors-To: dev-bounces@dpdk.org Sender: "dev" On 4/21/2021 8:16 AM, Min Hu (Connor) wrote: > From: Chengwen Feng > > This patch fixes possible null pointer access when dump iova table. > > Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table") > Cc: stable@dpdk.org > > Signed-off-by: Chengwen Feng > Signed-off-by: Min Hu (Connor) > --- > drivers/common/dpaax/dpaax_iova_table.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c > index 91bee65..54f89e1 100644 > --- a/drivers/common/dpaax/dpaax_iova_table.c > +++ b/drivers/common/dpaax/dpaax_iova_table.c > @@ -366,8 +366,10 @@ dpaax_iova_table_dump(void) > } > > DPAAX_DEBUG(" === Start of PA->VA Translation Table ==="); > - if (dpaax_iova_table_p == NULL) > + if (dpaax_iova_table_p == NULL) { > DPAAX_DEBUG("\tNULL"); > + return; > + } > > entry = dpaax_iova_table_p->entries; > for (i = 0; i < dpaax_iova_table_p->count; i++) { Acked-by: Hemant Agrawal