patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: Ferruh Yigit <ferruh.yigit@intel.com>, Weiguo Li <liwg06@foxmail.com>
Cc: ivan.ilchenko@oktetlabs.ru, dev@dpdk.org, stable@dpdk.org
Subject: Re: [PATCH] net/sfc: fix the argument to sizeof for unit cache
Date: Fri, 18 Feb 2022 17:43:46 +0300	[thread overview]
Message-ID: <8c95121b-bb87-55c0-5d2b-d98f19c87283@oktetlabs.ru> (raw)
In-Reply-To: <191c80de-37d4-da06-5fef-fdc3e47c58cb@intel.com>

On 2/18/22 17:38, Ferruh Yigit wrote:
> On 12/21/2021 6:41 AM, Weiguo Li wrote:
>> The size of unit cache should be sizeof(**cache) instead of
>> sizeof(*cache). Memory reallocation is inadequate by sizeof(*cache)
>> for the platform whose size of pointer is 32-bits. Found by coccinelle
>> (see https://coccinelle.gitlabpages.inria.fr/website) script.
>>
>> Fixes: 63abf8d29225 ("net/sfc: support SW stats groups")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Weiguo Li <liwg06@foxmail.com>
>> ---
>>   drivers/net/sfc/sfc_sw_stats.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/sfc/sfc_sw_stats.c 
>> b/drivers/net/sfc/sfc_sw_stats.c
>> index 70259660c0..81f5aa3cc4 100644
>> --- a/drivers/net/sfc/sfc_sw_stats.c
>> +++ b/drivers/net/sfc/sfc_sw_stats.c
>> @@ -777,7 +777,7 @@ sfc_sw_xstats_configure(struct sfc_adapter *sa)
>>       memset(*reset_vals, 0, nb_supported * sizeof(**reset_vals));
>> -    *cache = rte_realloc(*cache, cache_count * sizeof(*cache), 0);
>> +    *cache = rte_realloc(*cache, cache_count * sizeof(**cache), 0);
>>       if (*cache == NULL) {
>>           rc = ENOMEM;
>>           goto fail_cache;
> 
> 
> Hi Andrew, Ivan,
> 
> This patch seems missed, and it looks a valid fix to me.
> 
> Do you have any comment on patch?

Hi,

sorry, lost from my view as well.

Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

Thanks,
Andrew.

  reply	other threads:[~2022-02-18 14:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21  6:41 Weiguo Li
2022-02-18 14:38 ` Ferruh Yigit
2022-02-18 14:43   ` Andrew Rybchenko [this message]
2022-02-18 15:50     ` Ferruh Yigit

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=8c95121b-bb87-55c0-5d2b-d98f19c87283@oktetlabs.ru \
    --to=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=ivan.ilchenko@oktetlabs.ru \
    --cc=liwg06@foxmail.com \
    --cc=stable@dpdk.org \
    /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;
as well as URLs for NNTP newsgroup(s).