Message ID | 20221017184338.64152-1-pmanank200502@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1593454wrs; Mon, 17 Oct 2022 11:48:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4SStLBvt1N4SZZjod1lPnDD0EUDSuuYVrumrd30rZNiy6OuvRn4+pfxWri5eZQcWEB8bfu X-Received: by 2002:a05:6a02:303:b0:458:1e4b:1e89 with SMTP id bn3-20020a056a02030300b004581e4b1e89mr11414257pgb.123.1666032535088; Mon, 17 Oct 2022 11:48:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666032535; cv=none; d=google.com; s=arc-20160816; b=t9O+ziRkciLs4b8CgG+I0V8JYrlprU+QAMtVZPnCzwmu7DTGrrVzk2UJcEGzD9cfvF U1Z4LecIzHJ15twcqP6YWijIZQwA+wpJJdjKvsOHNsAyKjjO69jkRmgmuk7PnG+aJrbp wrm70KublWXcq/WVKQg820JNbBZkgQ1cmYBP6G4dmVh3svhBgFaKwbuG8ELhxdd+VwH7 dGsaeELn2RHHzpBFSFhZS+uUst2B3JhhZGP2zQMpUNT2KQavt/vlYJ0Djs5Rbh3/90jb +D31ppEvQpHiD6iPy9euKIHHTEBIeW4sX9J3PMuf4aLkpYyy3WUHdk3EcQkrg1jqvItZ Kg1w== 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=4EDculVdfuod3LvB+YZ/9tyRLowaSjT/EMGrKWwqWrs=; b=zcuKsJkndMXgPvgyS//pyY69Ot5kABaXRpHG1qxGFm6A1JRoi7a28NELtM5JNVVfdk JiCZjdKv3eMOIax6Vc3GXdNGrET51QO9704nDlxsAse41Cw37HjJgGbXGSH22mgK16Rg 5ZEmtO05z92Kf2Ptt6SmNLtC1g7z4j9oIoUBhPt8FFesmutwK2sM+UOVkNad/c8FAm4O qxmu51pposXS67XLWUjKcqm2SOFxTTJmqiRJCGZ4hWZJm77gIp8CxKpkry9wALz/Vmvk XsofIShhDexE1+Fpa/l8+MYf19XsCR/YvESLa2PWj1Eq7uAXm5B/p2YEaiyXBYMSk1X4 7KuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ag3jTmTk; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bk13-20020a056a02028d00b0046271a622cfsi12019625pgb.550.2022.10.17.11.48.41; Mon, 17 Oct 2022 11:48:55 -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=@gmail.com header.s=20210112 header.b=Ag3jTmTk; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229968AbiJQSoT (ORCPT <rfc822;kernel.ruili@gmail.com> + 99 others); Mon, 17 Oct 2022 14:44:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229911AbiJQSoP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 17 Oct 2022 14:44:15 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C7941C2; Mon, 17 Oct 2022 11:44:14 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id x31-20020a17090a38a200b0020d2afec803so11804083pjb.2; Mon, 17 Oct 2022 11:44:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4EDculVdfuod3LvB+YZ/9tyRLowaSjT/EMGrKWwqWrs=; b=Ag3jTmTkmqxi6rRrA6Rj3jQtI2WHV93lD7AVOheEsJ6CeVPutPpaNZOqSsCGMTVRNo ACyP8mowy4wm/T2YjeECJC5RcZo6Kdk1kfBjH0VT7GzKFyHXz4UXtBQihW3Zf5kqol5W 31IJpOKADtfRGIu9vpvwf2OCJSTzH2uTsAWOIjCFCsrL1d/RqPeZqwWXPNk2629NXEJD 2Ni3vOpt38/XBG7OwNoZ2XYwqUes1TZ81nkMUMT4oZ0T2/uvdGbTUbk59mHtBVXoWqks DwegG5xkm0qlGJjxkeWwHKXZi0Gg1lhm+x5ITOrG0ICZ8hP9Xy7onvZ5gVz310ouRj79 YQzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4EDculVdfuod3LvB+YZ/9tyRLowaSjT/EMGrKWwqWrs=; b=w5L57yAnzQRsNhqRPcDA98stA5h9SmENNzLRcGaPLzWvsFG6XAahxvXIGHK8xXh6hw h7XQRdliqW1hT4ydZchG8Va4G1grKiIYW1ylldx12U4ryeCN1CFlS4FvfJGKzu9MVh8k 0UZVcEJn0THD2APHLuR7tFcQ57AE+etkoISrq0Om0/mWECVyvUg8nnCyAVlEcXfZxHdj edgwFMk9p/TZRnI4UN58+TUJNeExZQkMzlIyko+VyutqaXdBDeASJ6HbkWF+oCeGDm11 okeNwERHlX7XaKT5sAGuKN0oSi483lAW1ZPGzdBs9FCRstO1I+RpXbxsxkqlbb7EI7S0 +fww== X-Gm-Message-State: ACrzQf3pU0BHel1SlNkAmhFBP3LEc3Of3T24t8xx4P9kYrvI+PXNf+yf Wnd8ezuSEEX2fxULMMTidsY51KiQGYM= X-Received: by 2002:a17:90b:33c3:b0:20a:ebc3:6514 with SMTP id lk3-20020a17090b33c300b0020aebc36514mr34401275pjb.147.1666032253704; Mon, 17 Oct 2022 11:44:13 -0700 (PDT) Received: from localhost ([115.117.107.100]) by smtp.gmail.com with ESMTPSA id q12-20020a17090311cc00b001801aec1f6bsm7011337plh.141.2022.10.17.11.44.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 11:44:13 -0700 (PDT) From: Manank Patel <pmanank200502@gmail.com> To: rafael@kernel.org Cc: lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Manank Patel <pmanank200502@gmail.com>, Sudeep Holla <sudeep.holla@arm.com> Subject: [PATCH v2] "ACPI: PCC: Fix unintentional integer overflow" Date: Tue, 18 Oct 2022 00:13:39 +0530 Message-Id: <20221017184338.64152-1-pmanank200502@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221017182035.3g67uudttl6k5gag@bogus> References: <20221017182035.3g67uudttl6k5gag@bogus> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746961731494192572?= X-GMAIL-MSGID: =?utf-8?q?1746961731494192572?= |
Series |
[v2] "ACPI: PCC: Fix unintentional integer overflow"
|
|
Commit Message
Manank Patel
Oct. 17, 2022, 6:43 p.m. UTC
Fixed unintentional u32 overflow by changing PCC_CMD_WAIT_RETRIES_NUM to 500ULL Fixes: 91cefefb6991 ("ACPI: PCC: replace wait_for_completion()") Signed-off-by: Manank Patel <pmanank200502@gmail.com> Acked-by: Sudeep Holla <sudeep.holla@arm.com> --- Thank you so much @sudeep for your clarifications! Changelog: v1->v2: Change the macro itself to ULL instead of typecasting in the code drivers/acpi/acpi_pcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Tue, Oct 18, 2022 at 3:13 AM lihuisong (C) <lihuisong@huawei.com> wrote: > > > 在 2022/10/18 2:43, Manank Patel 写道: > > Fixed unintentional u32 overflow by changing PCC_CMD_WAIT_RETRIES_NUM to 500ULL > > > > Fixes: 91cefefb6991 ("ACPI: PCC: replace wait_for_completion()") > > > > Signed-off-by: Manank Patel <pmanank200502@gmail.com> > > Acked-by: Sudeep Holla <sudeep.holla@arm.com> > > > > --- > > Thank you so much @sudeep for your clarifications! > > > > Changelog: > > v1->v2: > > Change the macro itself to ULL instead of typecasting in the > > code > > > > drivers/acpi/acpi_pcc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/acpi/acpi_pcc.c b/drivers/acpi/acpi_pcc.c > > index ee4ce5ba1fb2..3e252be047b8 100644 > > --- a/drivers/acpi/acpi_pcc.c > > +++ b/drivers/acpi/acpi_pcc.c > > @@ -27,7 +27,7 @@ > > * Arbitrary retries in case the remote processor is slow to respond > > * to PCC commands > > */ > > -#define PCC_CMD_WAIT_RETRIES_NUM 500 > > +#define PCC_CMD_WAIT_RETRIES_NUM 500ULL > > > > struct pcc_data { > > struct pcc_mbox_chan *pcc_chan; > > Acked-by: Huisong Li <lihuisong@huawei.com> Applied as 6.1-rc material, thanks!
diff --git a/drivers/acpi/acpi_pcc.c b/drivers/acpi/acpi_pcc.c index ee4ce5ba1fb2..3e252be047b8 100644 --- a/drivers/acpi/acpi_pcc.c +++ b/drivers/acpi/acpi_pcc.c @@ -27,7 +27,7 @@ * Arbitrary retries in case the remote processor is slow to respond * to PCC commands */ -#define PCC_CMD_WAIT_RETRIES_NUM 500 +#define PCC_CMD_WAIT_RETRIES_NUM 500ULL struct pcc_data { struct pcc_mbox_chan *pcc_chan;