Re: memory leak in tcindex_set_parms

From: Cong Wang
Date: Tue Feb 04 2020 - 19:41:50 EST


On Tue, Feb 4, 2020 at 3:40 PM Eric Dumazet <eric.dumazet@xxxxxxxxx> wrote:
>
> The only thing the repro fires for me on latest net tree is an UBSAN warning about a silly ->shift

Yeah, I thought HEAD commit 322bf2d3 already contains my fix,
I was wrong.


>
> I have not tried it on the old kernel.
>
> [ 170.331009] UBSAN: Undefined behaviour in net/sched/cls_tcindex.c:239:29
> [ 170.337729] shift exponent 19375 is too large for 32-bit type 'int'

Please send your patch formally, it looks reasonable to me.

Thanks.