Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp986562pxb; Fri, 15 Apr 2022 17:28:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyug7Q0nmndGPiuEux7ij3JQGv0/jx/9yBJQDMULOzyJ8KMvj5ry0itWS9qqJ4ECXYsQVj4 X-Received: by 2002:a62:ce02:0:b0:506:1e31:2d2b with SMTP id y2-20020a62ce02000000b005061e312d2bmr1368099pfg.80.1650068938514; Fri, 15 Apr 2022 17:28:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650068938; cv=none; d=google.com; s=arc-20160816; b=iCCBSnrreCtp/oQjhp0TzEIpwf/JLL76WJ9/kAHP4FkieZ48cKqlX99TNNu1F7udBP lIUkyMf0GzYDH9jfiJ1LnUgjNzVc9FcijPTPrVSQ87YLv7DcwcNUsNge0lgy586+p/3G sUh+SIzJSNCZkKzJuhLhloRqRXxueNfZqwU6krCWwDKyDuDdFTptAbu87Qrw/yqtnkPI 7V2PeZe+qAius2ueq4UWHM5scqoTpnNnOSGRHXTXwmtly9Q3w13w2iXNw/H2LuHM3sDU bDxMZEk/LpabnBCChyzPq1RAufzmaJmWshmhZ51TtJouZb4YXnr3FccQla+Z78A+6h1y WrMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xaBNCcLxYeeG0qKCjQVB0DRbbiOwazzl1nKIfO4Zqbk=; b=Ybp2FesrTOmfpXDMHLWfSIdIZt/CPlU1Vhy2t4Jlfqe9Ercl7IZmQC7IDyUXVMz8il RAfu66y0hKzMMnyiyTxWQpNVVFyIT4hXh+BUI2MnjL0CRXfZwo5DMjbmw37mmLrYMnYU g2li38GBJm+AO+RuUuUr9PVceKoww2vRD6I2vOBxXbnMQ/EjmdDXMCob6jPrqNWF9BAg wlMos7NfXq1ZmcVQOv/UXHOv1ip/Ius0/7np7PNmurB1cbCX2Mub2G/qVVzgjxImy738 SR987KKkhNihU+SEJAYr735q33cQP8Hhi6nqazQjKJ4685YH+RL5lx0/ybVPZ1LU1GTY OLAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Qe7WwAm1; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h19-20020a63e153000000b0039d300cade6si2843301pgk.679.2022.04.15.17.28.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:28:58 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Qe7WwAm1; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BA024EEA69; Fri, 15 Apr 2022 17:26:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350173AbiDOUFJ (ORCPT + 99 others); Fri, 15 Apr 2022 16:05:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237323AbiDOUFI (ORCPT ); Fri, 15 Apr 2022 16:05:08 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E1B4AC932 for ; Fri, 15 Apr 2022 13:02:39 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 23FK2Y1v071240; Fri, 15 Apr 2022 15:02:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1650052954; bh=xaBNCcLxYeeG0qKCjQVB0DRbbiOwazzl1nKIfO4Zqbk=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Qe7WwAm1Bk9J396N3mFVR33BIAQtrO8ETtUlWgljp41cDXM3XSXtwCFV9lP5SX7WQ VrFgh7BJBmSr/MhIaOCbv9JMlzcFF5MFbd4Y3YL3HV4SSUKuKNFc0hE6NXWwgg04Cn dtXOFSnc3SOnPGe4RXkwLgfUSCUVVe/aBUIyrJJQ= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 23FK2YTv035851 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 15 Apr 2022 15:02:34 -0500 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Fri, 15 Apr 2022 15:02:34 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Fri, 15 Apr 2022 15:02:34 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 23FK2Y0u014889; Fri, 15 Apr 2022 15:02:34 -0500 From: Nishanth Menon To: , QintaoShen CC: Nishanth Menon , , , Subject: Re: [PATCH v1] soc: ti: ti_sci_pm_domains: Check for null return of devm_kcalloc Date: Fri, 15 Apr 2022 15:02:33 -0500 Message-ID: <165005283988.16277.2709789836252162848.b4-ty@ti.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <1648107843-29077-1-git-send-email-unSimple1993@163.com> References: <1648107843-29077-1-git-send-email-unSimple1993@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi QintaoShen, On Thu, 24 Mar 2022 15:44:03 +0800, QintaoShen wrote: > The allocation funciton devm_kcalloc may fail and return a null pointer, > which would cause a null-pointer dereference later. > It might be better to check it and directly return -ENOMEM just like the > usage of devm_kcalloc in previous code. > > I have applied the following to branch ti-drivers-soc-next on [1]. Thank you! [1/1] soc: ti: ti_sci_pm_domains: Check for null return of devm_kcalloc commit: ba56291e297d28aa6eb82c5c1964fae2d7594746 Sidenote: [PATCH] is sufficient for v1 of the patch, it is understood to be default indexed from 1 ;). Ofcourse, an update of the patch would have been posted as [PATCH V2] and so on.. All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. [1] git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git -- Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D