Re: [PATCH bpf v3 2/3] bpf: Fix hashtab overflow check on 32-bit arches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> writes:

> On Thu, Mar 7, 2024 at 4:03 AM Toke Høiland-Jørgensen <toke@xxxxxxxxxx> wrote:
>>
>> -       err = -E2BIG;
>> -       /* prevent zero size kmalloc and check for u32 overflow */
>> -       if (htab->n_buckets == 0 ||
>> -           htab->n_buckets > U32_MAX / sizeof(struct bucket))
>> +       /* prevent zero size kmalloc */
>> +       if (htab->n_buckets > U32_MAX / sizeof(struct bucket))
>
> The comment carried over the wrong half of the comment.
> I fixed it up while applying... to bpf-next.
> There probably will be no bpf pr,
> since the merge window is about to start.

Oops, yeah, completely misread that comment; thanks for fixing! :)

-Toke






[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux