Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp647588rwd; Wed, 7 Jun 2023 05:15:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7A5P81p9CPHc8gHLwqF83kWXAUAsW8PnYIvkVIYJHD8NXhiOCP667FOa5CIeFhwRdN41Vu X-Received: by 2002:a17:903:2305:b0:1b0:4c6c:716 with SMTP id d5-20020a170903230500b001b04c6c0716mr17083195plh.4.1686140122523; Wed, 07 Jun 2023 05:15:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686140122; cv=pass; d=google.com; s=arc-20160816; b=wuEt3bC7qEl7DSq+zFHcanJyFvZmMPw7TeFVFtZxt49KORhUmWEiFoxOhZoth9HqzV UZjzpdSOltauGdsOx6Yr74noSnm12yB2MoTR80Truvt3cU6g6/Zm28Yf2BE2hm7qMm2J 9PhRgT8sics0qmTe1D+e1zR/yzNK1oqqweHmbx+bM5ckd4KFHVikBeMnAw+OvEXD0kMT 0wy968re2enk/IqVq1JWTyQFWkFc4BDmRVU9JlI4w6AQ9dK2pWO2T1fjKL847cV1gtdR oeLibshkPA77kVF/yBu7Du5/dTLH3Ta57WjvAuS9t+eQhUNf2CZn7dmJCV82IgStA75c v74A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=14Jz6YbpcXUCNxasf0yV2BMqI8ssT6I9fHeVq+rnWEs=; b=njCcTasjawsWXUYlF9Q04A0RfnG2rjeMfImS64zDKOuH6wfovhcCkSj/jV6B341Q2f OdAVR0Lohsj9JdZmlBTSiuwnM8yyK/uiXAW+woKYx+88nRIPA6ryS4nOeFMK9kwafWCY Fdtn8wlF3O1rcp4H4fvQEY3vb0xT4Uc2YoZnm1rfkll4EUYhLQxHtZ1Psd2OA9GtwxkW nC2Ibj3/RlnAVDxDgNh8LjdqAnLVVLnokRTayvWBr2Mg+Gg5PammbAxXhrz1vFIIv+Lt C9+Td6uWnI+JNZj6T5fKnJu9lmhyfjrOD8gq/+cEUj7QcYfgoIFPqSsEtx29LzHi3l3c Xm2g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marvell.onmicrosoft.com header.s=selector1-marvell-onmicrosoft-com header.b=Vd7wY83n; arc=pass (i=1 spf=pass spfdomain=marvell.com dkim=pass dkdomain=marvell.com dmarc=pass fromdomain=marvell.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q4-20020a170902dac400b001afe7ef68afsi9002065plx.619.2023.06.07.05.15.05; Wed, 07 Jun 2023 05:15:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.onmicrosoft.com header.s=selector1-marvell-onmicrosoft-com header.b=Vd7wY83n; arc=pass (i=1 spf=pass spfdomain=marvell.com dkim=pass dkdomain=marvell.com dmarc=pass fromdomain=marvell.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240243AbjFGMFO (ORCPT + 99 others); Wed, 7 Jun 2023 08:05:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239458AbjFGMFF (ORCPT ); Wed, 7 Jun 2023 08:05:05 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DE231BD8; Wed, 7 Jun 2023 05:05:00 -0700 (PDT) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 357BIfRN030111; Wed, 7 Jun 2023 05:04:47 -0700 Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3r2a75aj7f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Jun 2023 05:04:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lSbVAmHbshLXkzp+QLLMX6adoi88L/JNLyZZmKTKZOOJudzUmcrjRujtQ//jV9b9bLnc2FvlFHwoySiUXeSvJ+X9oycAHNfjsQnV/DOrjYUFeGhALXdH1j5ciThm08nDcGg4Ibuzl/OecFq2FQ1zu7dn+y3l6a/ipfbEDsY59TchQ4d28/IM5td4h9O19f053Yj8F4fNzgROhx3UYUBHzsDO4rWTJ/ZQcJI9IREBHCI85x+KMHJF0367d0SD6pkW/0QPdLjK/FdkAIxr5MRO21MIsXmfkzHJ86e/tz0rpgNXN4XlgVRPnZpytUc1UJ7j0s7ZzWuoF3moH6veN6RvaA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=14Jz6YbpcXUCNxasf0yV2BMqI8ssT6I9fHeVq+rnWEs=; b=MmeXT8F56zjHJ22WRRPZ5g/+BoFy0BaDQ0JsySRzxEK0oNaHVqrbeNgNePDyvlx6yUpevS5c7FMAlo3fWOC7xj0Wz9VMjGLpiwYQ6RfL3NwQafh2tDy49Q6kOOLb9bF9vL3/HVM09kdjxXBpGaYvNMRacy5agaHDHVzYGU2qOEOff6RhFnEDgPq7yrBsk52nZKjzcibOg0m+qAN4xLVhvd5bEwY4OELH8tFTN6Z9dBsYiFgdnJtiIi2d8E0Nkv8oimZE9UYDdqL4xs+raXZlvyVul6S2SZgWjSFz+Um9gV8rZNL/WkIE/bLFPwIs6L3tphlRdkDZUKWJw0/cylnuzQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=14Jz6YbpcXUCNxasf0yV2BMqI8ssT6I9fHeVq+rnWEs=; b=Vd7wY83njq/uT46LbexQgSZiPmvmNBk6Uv9TTVhYcWFNau5nWwevG63DEPy9URfrM5E3k2QV0xHlRS9Tan4rdByGos9LrtlmqPrUwjetWkZaqZFp2Er64sfLU/rFLUNjDugv9kihqbHl1tUcjsjt1PTZuHdrpCV8JIwgA/uOPcQ= Received: from BY3PR18MB4707.namprd18.prod.outlook.com (2603:10b6:a03:3ca::23) by DS0PR18MB5501.namprd18.prod.outlook.com (2603:10b6:8:163::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.32; Wed, 7 Jun 2023 12:04:42 +0000 Received: from BY3PR18MB4707.namprd18.prod.outlook.com ([fe80::c8bc:9028:e12d:c138]) by BY3PR18MB4707.namprd18.prod.outlook.com ([fe80::c8bc:9028:e12d:c138%4]) with mapi id 15.20.6455.030; Wed, 7 Jun 2023 12:04:40 +0000 From: Sai Krishna Gajula To: Maciej Fijalkowski CC: "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Sunil Kovvuri Goutham , "dan.carpenter@linaro.org" , Naveen Mamindlapalli Subject: Re: [net PATCH] octeontx2-af: Fix pointer dereference before sanity check Thread-Topic: [net PATCH] octeontx2-af: Fix pointer dereference before sanity check Thread-Index: AQHZmTg8tSrDR18MGkOCDKfPn98TFw== Date: Wed, 7 Jun 2023 12:04:40 +0000 Message-ID: References: <20230607070255.2013980-1-saikrishnag@marvell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-dg-ref: =?us-ascii?Q?PG1ldGE+PGF0IG5tPSJib2R5LnR4dCIgcD0iYzpcdXNlcnNcc2Fpa3Jpc2hu?= =?us-ascii?Q?YWdcYXBwZGF0YVxyb2FtaW5nXDA5ZDg0OWI2LTMyZDMtNGE0MC04NWVlLTZi?= =?us-ascii?Q?ODRiYTI5ZTM1Ylxtc2dzXG1zZy03ODFjZmZmMi0wNTJiLTExZWUtYWQxZS1h?= =?us-ascii?Q?MGQwNWIwNGJhMDNcYW1lLXRlc3RcNzgxY2ZmZjMtMDUyYi0xMWVlLWFkMWUt?= =?us-ascii?Q?YTBkMDViMDRiYTAzYm9keS50eHQiIHN6PSIyNjAzIiB0PSIxMzMzMDYxMzA3?= =?us-ascii?Q?Njk2MDUyNTIiIGg9InlkTkE3UFBmTnorMjFyYVJZRHZEM1RGK2FMdz0iIGlk?= =?us-ascii?Q?PSIiIGJsPSIwIiBibz0iMSIgY2k9ImNBQUFBRVJIVTFSU1JVRk5DZ1VBQU40?= =?us-ascii?Q?UEFBQ0VjdWM2T0puWkFYWDNqWEVOREl3ZmRmZU5jUTBNakI4WkFBQUFBQUFB?= =?us-ascii?Q?QUFBQUFBQUFBQUFBQUFBQUF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?QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB?= =?us-ascii?Q?QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB?= =?us-ascii?Q?QUFBQUFBQUFBQUFBQUFBQUJBQUFBQUFBQUFBSUFBQUFBQUo0QUFBQnRBR0VB?= =?us-ascii?Q?Y2dCMkFHVUFiQUJzQUY4QWR3QnZBSElBWkFBQUFBQUFBQUFBQUFBQUFBQUFB?= =?us-ascii?Q?QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB?= =?us-ascii?Q?QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB?= =?us-ascii?Q?QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQVVBQUFBQUFBQUFBQUFB?= =?us-ascii?Q?QUFFQUFBQUFBQUFBQWdBQUFBQUEiLz48L21ldGE+?= x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BY3PR18MB4707:EE_|DS0PR18MB5501:EE_ x-ms-office365-filtering-correlation-id: b57f98cd-1755-43ab-912f-08db674f5f5c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UxBQhogrp5rKpTgwkxMSCmrICF9XtWYK882HrkiNuLj6T4iDMZUHgtr9ojb/YtOv3cO+gc22iJAjn1/rjz+wTP69m3l9Nn8fqd9QeHVBjIxhvQm5yyoMQKdgHCGHawFw7WnAojo+Q0MytaRbCgl/gflFWS0Nn82QCRY1GtKlFr1msYFMB7Phf09jthsI1CJ3ixMgenYBbK+xeC70skjlIBz5uNX7yW1vwFP/SODUHOp4HLiSVLqkPqz7DX2udFaStWLjFktfqbznM/uLi4zKchAZZ6uMRT7vBQas9MmfH8haKBht0On9cYoiflVL7UdFBaHyEsIhtDftVsXejK2O8o8CwdrfU7J4DBjdTybq9Lh8wsY9W5I0Sj9sHp0CKKv/HLZ17zBqceI/Uqs0E1inUVVDYM8KaQxozOwFjvLb/aZGA1h21y2SZczeFYct77sAhQ3SSkMaOqeSZU9tPHBDyGa52aFl5yGQvh93BkgV5h9g/rY1Xh/MDzzjQtKDZqU31o7hMoXwFyqo8GLkf2VRYtvY2MK/wns7XiJwfiazopad3Bb0bAes55OgY48OW/5S75Tctm3pLbzE7NzYVDxzvg1iGDJQ5VwGlysy9U5RUX9L1rpOVp7I/RSfgh50Kh+m x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY3PR18MB4707.namprd18.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(136003)(396003)(39860400002)(376002)(346002)(451199021)(9686003)(26005)(6506007)(107886003)(53546011)(83380400001)(86362001)(38070700005)(33656002)(122000001)(38100700002)(186003)(55016003)(8936002)(41300700001)(54906003)(2906002)(64756008)(478600001)(6916009)(76116006)(66946007)(8676002)(4326008)(316002)(52536014)(5660300002)(7696005)(71200400001)(66476007)(66446008)(66556008);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?fVmbZNvtZk2b8kOxPbjQ1h5CbhuSVSiFLcsX4LQEqTTfophh9shgAU+wen57?= =?us-ascii?Q?DpNhK7qZNsbfBGBJgMUziTXZGSLfKCXoafkb+Oj8COKB7Hy31Rl2YxvhomGw?= =?us-ascii?Q?AVmACPrXG9J5BJr8GDybBICLbPG1jnYcaY/7e84Q8JyazmUFDnNE3ZG3TPBR?= =?us-ascii?Q?HqD29oeSghF5jXmVQcEgLMUm7OxUAsPn25gpi759XybCv5V8/UdzHcODT3y5?= =?us-ascii?Q?9peq6UMX7pez9EzY4cqVcRncES/7wT3dyG1EOxu02TN4dM7mWafIijRzMwMR?= =?us-asc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ofRBWdRzkrOl6f8A?= =?us-ascii?Q?d7BJw9tM/cWv8WFm44aZFxtxxHNoXjDkT6hjyWFn4qtzwcZQSx8F06P514kX?= =?us-ascii?Q?KaPpZPt7UfWZsOPnoZMWNgDD4b2E/fA0M4EoQwaaTYK2sP4d1Q0C4O37TIQM?= =?us-ascii?Q?eeyoIeiqaIkEbs8WXoCGspQxQZf2oRGTIuxJ9SUn1rj2KLW/q20k/yQRbOJH?= =?us-ascii?Q?iwcHx/bJRMBGtIyc6q3c85Z/UWN4TWEK2i+isAp/grFDRrz5jO7lvPaIk9EE?= =?us-ascii?Q?RPL3+V+S1BNmXsVo4ABRlNMOuYtFaWZHBpA3rqSe5TtcY6ByJzzcOjEOvENg?= =?us-ascii?Q?iNCSaTd0rVmd8CXlW4CEH8WQpT0coH2wD5zy0/bJbCAW0d7MKxsG2o9bb+gC?= =?us-ascii?Q?C8hbwY9f9Zv0rkyk7q0TrvnRwG4axCJ8we8hGGdN?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY3PR18MB4707.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b57f98cd-1755-43ab-912f-08db674f5f5c X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jun 2023 12:04:40.2426 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: xRDwT/zdD5siLiQRMxbNhPajvDq5+nkg6zIAFXgaUA+agefJ6+aUTbGPrlRQAWBeDGY+LfEIdkkhmsuY10xhiA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR18MB5501 X-Proofpoint-ORIG-GUID: aHIcJVSteN5WpUwGFfi6OjSEwYFWi6Eh X-Proofpoint-GUID: aHIcJVSteN5WpUwGFfi6OjSEwYFWi6Eh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-07_06,2023-06-07_01,2023-05-22_02 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Maciej Fijalkowski > Sent: Wednesday, June 7, 2023 5:17 PM > To: Sai Krishna Gajula > Cc: davem@davemloft.net; edumazet@google.com; kuba@kernel.org; > pabeni@redhat.com; netdev@vger.kernel.org; linux- > kernel@vger.kernel.org; Sunil Kovvuri Goutham ; > dan.carpenter@linaro.org; Naveen Mamindlapalli > Subject: Re: [net PATCH] octeontx2-af: Fix pointer dereference before > sanity check >=20 > On Wed, Jun 07, 2023 at 12:32:55PM +0530, Sai Krishna wrote: > > PTP pointer is being dereferenced before NULL, error check. > > Fixed the same to avoid NULL dereference and smatch checker warning. >=20 > please use imperative mood, you could say: > Move validation of ptp pointer before its usage >=20 I will change in V2 patch. > > > > Fixes: 2ef4e45d99b1 ("octeontx2-af: Add PTP PPS Errata workaround on > CN10K silicon") > > Signed-off-by: Sai Krishna > > Signed-off-by: Naveen Mamindlapalli >=20 > Reviewed-by: Maciej Fijalkowski >=20 > > --- > > drivers/net/ethernet/marvell/octeontx2/af/ptp.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/net/ethernet/marvell/octeontx2/af/ptp.c > b/drivers/net/ethernet/marvell/octeontx2/af/ptp.c > > index 3411e2e47d46..6a7dfb181fa8 100644 > > --- a/drivers/net/ethernet/marvell/octeontx2/af/ptp.c > > +++ b/drivers/net/ethernet/marvell/octeontx2/af/ptp.c > > @@ -449,12 +449,12 @@ static void ptp_remove(struct pci_dev *pdev) > > struct ptp *ptp =3D pci_get_drvdata(pdev); > > u64 clock_cfg; > > > > - if (cn10k_ptp_errata(ptp) && hrtimer_active(&ptp->hrtimer)) > > - hrtimer_cancel(&ptp->hrtimer); > > - > > if (IS_ERR_OR_NULL(ptp)) > > return; > > > > + if (cn10k_ptp_errata(ptp) && hrtimer_active(&ptp->hrtimer)) > > + hrtimer_cancel(&ptp->hrtimer); > > + > > /* Disable PTP clock */ > > clock_cfg =3D readq(ptp->reg_base + PTP_CLOCK_CFG); > > clock_cfg &=3D ~PTP_CLOCK_CFG_PTP_EN; >=20 > i wonder if ptp_remove() would be able to free the struct ptp that > ptp_probe() allocated - then you wouldn't have to use devm_kzalloc(). >=20 We intend to use devm_kzalloc() so that we do not need to call kfree in the= remove function. Please let us know why you prefer to manually free the re= source. Thanks, Sai > > -- > > 2.25.1 > > > >