From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Hanjun Guo <guohanjun@huawei.com>
Cc: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
Sudeep Holla <sudeep.holla@arm.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>
Subject: Re: [PATCH v1 1/1] ACPI/IORT: Switch to use kmemdup_array()
Date: Fri, 9 Aug 2024 15:16:34 +0300 [thread overview]
Message-ID: <ZrYIosRuNG9S-SqM@smile.fi.intel.com> (raw)
In-Reply-To: <2edd3b72-24a4-8b19-8738-cc82dc4fae6c@huawei.com>
On Fri, Jun 14, 2024 at 08:54:39AM +0800, Hanjun Guo wrote:
> +Cc Catalin
>
> On 2024/6/11 18:42, Hanjun Guo wrote:
> > On 2024/6/7 0:50, Andy Shevchenko wrote:
> > > Let the kememdup_array() take care about multiplication and possible
> > > overflows.
> > >
> > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > ---
> > > drivers/acpi/arm64/iort.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
> > > index c0b1c2c19444..e596dff20f1e 100644
> > > --- a/drivers/acpi/arm64/iort.c
> > > +++ b/drivers/acpi/arm64/iort.c
> > > @@ -822,7 +822,7 @@ static struct iommu_iort_rmr_data *iort_rmr_alloc(
> > > return NULL;
> > > /* Create a copy of SIDs array to associate with this rmr_data */
> > > - sids_copy = kmemdup(sids, num_sids * sizeof(*sids), GFP_KERNEL);
> > > + sids_copy = kmemdup_array(sids, num_sids, sizeof(*sids),
> > > GFP_KERNEL);
> > > if (!sids_copy) {
> > > kfree(rmr_data);
> > > return NULL;
> >
> > Looks good to me,
> >
> > Acked-by: Hanjun Guo <guohanjun@huawei.com>
>
> Catalin, would you mind pick this up as well?
Any news?
I do not see this even in Linux Next...
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-08-09 12:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 16:50 [PATCH v1 1/1] ACPI/IORT: Switch to use kmemdup_array() Andy Shevchenko
2024-06-11 10:42 ` Hanjun Guo
2024-06-14 0:54 ` Hanjun Guo
2024-08-09 12:16 ` Andy Shevchenko [this message]
2024-08-09 12:52 ` Catalin Marinas
2024-08-09 13:16 ` Hanjun Guo
2024-08-09 13:46 ` Andy Shevchenko
2024-08-09 12:52 ` Hanjun Guo
2024-08-16 15:15 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZrYIosRuNG9S-SqM@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=catalin.marinas@arm.com \
--cc=guohanjun@huawei.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=rafael@kernel.org \
--cc=sudeep.holla@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox