Re: [PATCH net-next] ntp: fix size argument for kcalloc

Przemek Kitszel
2024-07-04T10:17:52Z

On 7/4/24 11:41, Paolo Abeni wrote:
> On Thu, 2024-07-04 at 11:36 +0200, Paolo Abeni wrote:
>> On Wed, 2024-07-03 at 11:16 +0200, Przemek Kitszel wrote:
>>> On 7/3/24 04:56, Chen Ni wrote:
>>>> The size argument to kcalloc should be the size of desired structure,
>>>
>>> xsk_pools is a double pointer, so not "desired structure" but rather you
>>> should talk about an element size.
>>>
>>>> not the pointer to it.
>>>>
>>>> Fixes: 6402528b7a0b ("nfp: xsk: add AF_XDP zero-copy Rx and Tx support")
>>>
>>> even if the the behavior is not changed, the fix should be targeted to
>>> net tree
>>
>> This patch is IMHO more a cleanup than a real fix. As such it's more
>> suited for net-next. For the same reason I think it should not go to
>> stable, so I'm dropping the fixes tag, too.

I'm fine with targeting it at any of the trees.

But I still believe it is a fix, even if a trivial one, and even if code
"works" - it's a "wrong" code.

Here I received similar feedback in a similar case:
https://www.mail-archive.com/intel-wired-lan@osuosl.org/msg03252.html
and I changed my mind then.

>
> Thinking again about it, this patch has a few things to be cleaned-up.
>
> @Chen Ni, please submit a new revision, adjusting the subj and commit
> message as per Przemek and Simon feedback and dropping the fixes tag,
> still targeting net-next.
>
> You can retain the already collected tags.
>
> Thanks,
>
> Paolo
>