lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANLsYkzT0b-zntPm=3Q4dL91oiqfojtaYL+aFNc1Rv__fzkNZQ@mail.gmail.com>
Date:   Tue, 28 Jul 2020 15:37:18 -0600
From:   Mathieu Poirier <mathieu.poirier@...aro.org>
To:     Xu Wang <vulab@...as.ac.cn>
Cc:     "Suzuki K. Poulose" <suzuki.poulose@....com>,
        Mike Leach <mike.leach@...aro.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] coresight: Use devm_kcalloc() in coresight_alloc_conns()

On Sun, 26 Jul 2020 at 19:51, Xu Wang <vulab@...as.ac.cn> wrote:
>
> A multiplication for the size determination of a memory allocation
> indicated that an array data structure should be processed.
> Thus use the corresponding function "devm_kcalloc".
>
> Signed-off-by: Xu Wang <vulab@...as.ac.cn>
> ---
>  drivers/hwtracing/coresight/coresight-platform.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-platform.c b/drivers/hwtracing/coresight/coresight-platform.c
> index e4912abda3aa..d1460b6e4e07 100644
> --- a/drivers/hwtracing/coresight/coresight-platform.c
> +++ b/drivers/hwtracing/coresight/coresight-platform.c
> @@ -27,7 +27,7 @@ static int coresight_alloc_conns(struct device *dev,
>                                  struct coresight_platform_data *pdata)
>  {
>         if (pdata->nr_outport) {
> -               pdata->conns = devm_kzalloc(dev, pdata->nr_outport *
> +               pdata->conns = devm_kcalloc(dev, pdata->nr_outport,

https://lkml.org/lkml/2020/5/27/1098

>                                             sizeof(*pdata->conns),
>                                             GFP_KERNEL);
>                 if (!pdata->conns)
> --
> 2.17.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ